Merge pull request #911 from font/purge

Updates to containerized purge cluster playbook
pull/912/head
Leseb 2016-07-28 17:29:01 +02:00 committed by GitHub
commit c34179e492
1 changed files with 48 additions and 20 deletions

View File

@ -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