Commit 953ceed5 authored by ale's avatar ale

Use the right container_runtime when pruning deleted services

parent da446dc5
Pipeline #6187 failed with stages
in 2 minutes and 22 seconds
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
when: "container_runtime == 'podman'" when: "container_runtime == 'podman'"
- name: Login to the Docker registry - name: Login to the Docker registry
command: 'echo -n "{{ docker_registry_password }}" | docker login -u "{{ docker_registry_username }}" --password-stdin "{{ docker_registry_url }}"' command: 'echo -n "{{ docker_registry_password }}" | {{ container_runtime }} login -u "{{ docker_registry_username }}" --password-stdin "{{ docker_registry_url }}"'
changed_when: False changed_when: False
when: "docker_registry_url != ''" when: "docker_registry_url != ''"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
# the ones that are not specified in services.yml. # the ones that are not specified in services.yml.
- name: Get list of running containers - name: Get list of running containers
command: "docker ps --format={% raw %}'{{.Names}}'{% endraw %}" command: "{{ container_runtime }} ps --format={% raw %}'{{.Names}}'{% endraw %}"
changed_when: False changed_when: False
check_mode: no check_mode: no
register: docker_running_containers register: docker_running_containers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment