mirror of https://github.com/ceph/ceph-ansible.git
Updates to containerized purge cluster playbook
- Reorder package removal steps - Remove package dependencies after package is removed Signed-off-by: Ivan Font <ivan.font@redhat.com>pull/911/head
parent
87c7ad97a5
commit
3d2487d2a1
|
@ -361,11 +361,36 @@
|
|||
enabled: no
|
||||
when: not is_atomic
|
||||
|
||||
- name: remove docker-py
|
||||
pip:
|
||||
name: docker-py
|
||||
version: 1.1.0
|
||||
state: absent
|
||||
when:
|
||||
ansible_version['full'] | version_compare('2.1.0.0', '<') and
|
||||
not is_atomic
|
||||
|
||||
- name: remove docker-py
|
||||
pip:
|
||||
name: docker-py
|
||||
state: absent
|
||||
when:
|
||||
ansible_version['full'] | version_compare('2.1.0.0', '>=') and
|
||||
not is_atomic
|
||||
|
||||
- name: remove six
|
||||
pip:
|
||||
name: six
|
||||
version: 1.9.0
|
||||
state: absent
|
||||
when: not is_atomic
|
||||
|
||||
- name: remove pip and docker on ubuntu
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
update_cache: yes
|
||||
autoremove: yes
|
||||
with_items:
|
||||
- python-pip
|
||||
- docker
|
||||
|
@ -377,6 +402,7 @@
|
|||
name: "{{ item }}"
|
||||
state: absent
|
||||
update_cache: yes
|
||||
autoremove: yes
|
||||
with_items:
|
||||
- python-pip
|
||||
- docker-engine
|
||||
|
@ -411,7 +437,6 @@
|
|||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
not is_atomic
|
||||
failed_when: false
|
||||
|
||||
# for CentOS
|
||||
- name: remove docker on redhat
|
||||
|
@ -424,7 +449,6 @@
|
|||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
not is_atomic
|
||||
failed_when: false
|
||||
|
||||
- name: remove pip and docker on redhat
|
||||
dnf:
|
||||
|
@ -439,28 +463,32 @@
|
|||
ansible_pkg_mgr == "dnf" and
|
||||
not is_atomic
|
||||
|
||||
- name: remove six
|
||||
pip:
|
||||
name: six
|
||||
version: 1.9.0
|
||||
state: absent
|
||||
when: not is_atomic
|
||||
|
||||
- name: remove docker-py
|
||||
pip:
|
||||
name: docker-py
|
||||
version: 1.1.0
|
||||
state: absent
|
||||
- name: remove package dependencies on redhat
|
||||
command: yum -y autoremove
|
||||
when:
|
||||
ansible_version['full'] | version_compare('2.1.0.0', '<') and
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
not is_atomic
|
||||
|
||||
- name: remove docker-py
|
||||
pip:
|
||||
name: docker-py
|
||||
state: absent
|
||||
- name: remove package dependencies on redhat again
|
||||
command: yum -y autoremove
|
||||
when:
|
||||
ansible_version['full'] | version_compare('2.1.0.0', '>=') and
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
not is_atomic
|
||||
|
||||
- name: remove package dependencies on redhat
|
||||
command: dnf -y autoremove
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "dnf" and
|
||||
not is_atomic
|
||||
|
||||
- name: remove package dependencies on redhat again
|
||||
command: dnf -y autoremove
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "dnf" and
|
||||
not is_atomic
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue