ansible-role-powershell/tasks/add_repo_Debian.yml

27 lines
818 B
YAML

---
- name: Registering Ubuntu Powershell repository
get_url:
url: https://packages.microsoft.com/config/ubuntu/{{ ansible_distribution_version }}/prod.list
dest: /etc/apt/sources.list.d/microsoft.list
owner: root
group: root
mode: 0644
when:
- ansible_distribution == "Ubuntu"
- name: Registering Debian Powershell repository
apt_repository:
repo: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-{{ ansible_distribution_name }}-prod {{ ansible_distribution_name }} main
filename: microsoft.list
state: present
update_cache: yes
mode: 0644
# owner: root
# group: root
when:
- ansible_distribution == "Debian"
- name: Install public repository GPG keys
apt_key:
url: /etc/apt/sources.list.d/microsoft.list
state: present