Merge "Simplify tripleo_container_rm to not check binaries"
This commit is contained in:
commit
24eaae5ae9
|
@ -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'
|
|
||||||
|
|
Loading…
Reference in New Issue