container: fix ansible check mode when image not present on host

This commit is contained in:
uumas
2023-03-15 03:31:24 +02:00
parent 2b43003564
commit 70bc3ce15b
3 changed files with 4 additions and 2 deletions

View File

@@ -43,9 +43,10 @@
name: "{{ ('local_' + docker_service) if dockerfile is defined and dockerfile | length > 0 else docker_image }}"
register: existing_image
- name: Set check nmode container_image variable
- name: Set check mode container_image variable
set_fact:
container_image: "{{ existing_image.images[0] }}"
when: existing_image.images | length > 0
- name: Set image user variable
set_fact: