Browse Source

Merge "Simplify tripleo_container_rm to not check binaries"

changes/25/720825/1
Zuul 2 years ago committed by Gerrit Code Review
parent
commit
24eaae5ae9
  1. 33
      tripleo_ansible/roles/tripleo_container_rm/tasks/main.yml

33
tripleo_ansible/roles/tripleo_container_rm/tasks/main.yml

@ -14,32 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
- block:
- name: Check for docker cli
stat:
path: "/var/run/docker.sock"
register: check_docker_cli
check_mode: false
- include_tasks: "tripleo_{{ tripleo_container_cli }}_container_rm.yml"
vars:
container: "{{ item }}"
with_items: "{{ tripleo_containers_to_rm }}"
when: check_docker_cli.stat.exists|bool
when:
- tripleo_container_cli == 'docker'
- block:
- name: Check for podman cli
command: "command -v podman"
register: check_podman_cli
failed_when: false
check_mode: false
- include_tasks: "tripleo_{{ tripleo_container_cli }}_container_rm.yml"
vars:
container: "{{ item }}"
with_items: "{{ tripleo_containers_to_rm }}"
when: check_podman_cli.rc == 0
when:
- tripleo_container_cli == 'podman'
- include_tasks: "tripleo_{{ tripleo_container_cli }}_container_rm.yml"
vars:
container: "{{ item }}"
with_items: "{{ tripleo_containers_to_rm }}"

Loading…
Cancel
Save