diff options
Diffstat (limited to 'fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml')
-rw-r--r-- | fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml new file mode 100644 index 0000000000..302b43c99a --- /dev/null +++ b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml @@ -0,0 +1,21 @@ +--- +# file: roles/cleanup/tasks/remove_package.yaml + +- name: Remove Package - Fix Corrupted APT + shell: "dpkg --configure -a" + when: + - ansible_distribution == 'Ubuntu' + tags: + - remove-package + +- name: Remove Package - {{ package }} + apt: + name: "{{ package }}" + force: yes + purge: yes + state: "absent" + failed_when: no + when: + - ansible_distribution == 'Ubuntu' + tags: + - remove-package |