Merge "Simplify tripleo_container_rm to not check binaries"

This commit is contained in:
Zuul 2020-04-17 19:52:02 +00:00 committed by Gerrit Code Review
commit 24eaae5ae9
1 changed files with 4 additions and 29 deletions

View File

@ -14,32 +14,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
- block: - include_tasks: "tripleo_{{ tripleo_container_cli }}_container_rm.yml"
- name: Check for docker cli vars:
stat: container: "{{ item }}"
path: "/var/run/docker.sock" with_items: "{{ tripleo_containers_to_rm }}"
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'