mirror of https://github.com/ansible/ansible.git
Make Docker and Podman play nice (#65009)
podman 1.4 now installs docker man pages. Add handler to remove docker packages to avoid test failure due to this conflict. Adjust inventory_docker_swarm integration test Add conditional to cleanup handlers to allow use of the setup_docker role without removing packages at the end of the play. The inventory_docker_swarm integration tests does its own cleanup.pull/65025/head
parent
163904fe37
commit
6b2b876d43
@ -1,9 +1,18 @@
|
||||
---
|
||||
- hosts: 127.0.0.1
|
||||
connection: local
|
||||
gather_facts: no
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Make sure swarm is removed
|
||||
docker_swarm:
|
||||
state: absent
|
||||
force: yes
|
||||
|
||||
- name: remove docker pagkages
|
||||
action: "{{ ansible_facts.pkg_mgr }}"
|
||||
args:
|
||||
name:
|
||||
- docker
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
state: absent
|
||||
|
@ -0,0 +1,14 @@
|
||||
- name: remove pip packages
|
||||
pip:
|
||||
state: present
|
||||
name: "{{ docker_pip_packages | union(docker_pip_extra_packages) }}"
|
||||
listen: cleanup docker
|
||||
when: not docker_skip_cleanup | bool
|
||||
|
||||
- name: remove docker pagkages
|
||||
action: "{{ ansible_facts.pkg_mgr }}"
|
||||
args:
|
||||
name: "{{ docker_cleanup_packages }}"
|
||||
state: absent
|
||||
listen: cleanup docker
|
||||
when: not docker_skip_cleanup | bool
|
@ -0,0 +1,9 @@
|
||||
- name: remove podman packages
|
||||
yum:
|
||||
name: 'podman*'
|
||||
state: absent
|
||||
listen: cleanup podman
|
||||
|
||||
- name: remove extras repo
|
||||
command: "{{ repo_command[ansible_facts.distribution ~ ansible_facts.distribution_major_version]['disable'] | default('echo') }}"
|
||||
listen: cleanup podman
|
@ -1,2 +1,4 @@
|
||||
repo_command:
|
||||
RedHat7: yum-config-manager --enable rhui-REGION-rhel-server-extras
|
||||
RedHat7:
|
||||
enable: yum-config-manager --enable rhui-REGION-rhel-server-extras
|
||||
disable: yum-config-manager --disable rhui-REGION-rhel-server-extras
|
||||
|
Loading…
Reference in New Issue