mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #911 from font/purge
Updates to containerized purge cluster playbookpull/912/head
commit
c34179e492
|
@ -361,11 +361,36 @@
|
||||||
enabled: no
|
enabled: no
|
||||||
when: not is_atomic
|
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
|
- name: remove pip and docker on ubuntu
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
autoremove: yes
|
||||||
with_items:
|
with_items:
|
||||||
- python-pip
|
- python-pip
|
||||||
- docker
|
- docker
|
||||||
|
@ -377,6 +402,7 @@
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
autoremove: yes
|
||||||
with_items:
|
with_items:
|
||||||
- python-pip
|
- python-pip
|
||||||
- docker-engine
|
- docker-engine
|
||||||
|
@ -411,7 +437,6 @@
|
||||||
ansible_os_family == 'RedHat' and
|
ansible_os_family == 'RedHat' and
|
||||||
ansible_pkg_mgr == "yum" and
|
ansible_pkg_mgr == "yum" and
|
||||||
not is_atomic
|
not is_atomic
|
||||||
failed_when: false
|
|
||||||
|
|
||||||
# for CentOS
|
# for CentOS
|
||||||
- name: remove docker on redhat
|
- name: remove docker on redhat
|
||||||
|
@ -424,7 +449,6 @@
|
||||||
ansible_os_family == 'RedHat' and
|
ansible_os_family == 'RedHat' and
|
||||||
ansible_pkg_mgr == "yum" and
|
ansible_pkg_mgr == "yum" and
|
||||||
not is_atomic
|
not is_atomic
|
||||||
failed_when: false
|
|
||||||
|
|
||||||
- name: remove pip and docker on redhat
|
- name: remove pip and docker on redhat
|
||||||
dnf:
|
dnf:
|
||||||
|
@ -439,28 +463,32 @@
|
||||||
ansible_pkg_mgr == "dnf" and
|
ansible_pkg_mgr == "dnf" and
|
||||||
not is_atomic
|
not is_atomic
|
||||||
|
|
||||||
- name: remove six
|
- name: remove package dependencies on redhat
|
||||||
pip:
|
command: yum -y autoremove
|
||||||
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
|
|
||||||
when:
|
when:
|
||||||
ansible_version['full'] | version_compare('2.1.0.0', '<') and
|
ansible_os_family == 'RedHat' and
|
||||||
|
ansible_pkg_mgr == "yum" and
|
||||||
not is_atomic
|
not is_atomic
|
||||||
|
|
||||||
- name: remove docker-py
|
- name: remove package dependencies on redhat again
|
||||||
pip:
|
command: yum -y autoremove
|
||||||
name: docker-py
|
|
||||||
state: absent
|
|
||||||
when:
|
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
|
not is_atomic
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue