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/6904/head
Seena Fallah 2021-08-17 01:07:40 +04:30 committed by Guillaume Abrioux
parent eef429a75b
commit 25e078f685
1 changed files with 8 additions and 0 deletions

View File

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