purge: add remove_docker tag

This can help to skip docker removal tasks

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit ff39c8d70b)
pull/6913/head
Seena Fallah 2021-08-17 01:07:40 +04:30 committed by Guillaume Abrioux
parent 0ede37b2ec
commit 0a93de938b
1 changed files with 8 additions and 0 deletions

View File

@ -968,6 +968,8 @@
- not is_atomic
- container_binary == 'docker'
ignore_errors: true
tags:
- remove_docker
- name: remove docker on debian/ubuntu
apt:
@ -976,6 +978,8 @@
update_cache: yes
autoremove: yes
when: ansible_facts['os_family'] == 'Debian'
tags:
- remove_docker
- name: red hat based systems tasks
block:
@ -1019,6 +1023,8 @@
when:
ansible_facts['os_family'] == 'RedHat' and
not is_atomic
tags:
- remove_docker
- name: find any service-cid file left
find:
@ -1078,6 +1084,8 @@
- name: remove docker data
shell: rm -rf /var/lib/docker/* # noqa 302
when: not is_atomic | bool
tags:
- remove_docker
- name: purge fetch directory