ansible-role-powershell/tasks/uninstall.yml
Adrien 3f730149ac
All checks were successful
continuous-integration/drone/push Build is passing
Change latest by present
2020-06-02 00:30:37 +02:00

29 lines
856 B
YAML

---
- name: Remove PowerShell's files
file:
path: "/etc/yum.repos.d/microsoft.repo"
state: absent
when:
- ansible_os_family == 'RedHat'
- name: Registering Ubuntu PowerShell repository
file:
path: "/etc/apt/sources.list.d/microsoft.list"
state: absent
when:
- ansible_distribution == "Ubuntu"
- name: Registering Debian AnsiPowerShellble 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: absent
update_cache: yes
when:
- ansible_distribution == "Debian"
- name: Remove AnsiPowerShellble's packages
package:
name: '{{ powershell_packages }}'
state: absent
update_cache: yes