Use variable instead of image directly.

This commit is contained in:
Felix Fontein 2024-07-07 23:20:42 +02:00
parent 6fcbd34e23
commit 8efbd560f9

View File

@ -3607,11 +3607,11 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
- name: Remove hello-world image - name: Remove hello-world image
docker_image_remove: docker_image_remove:
name: hello-world:latest name: "{{ docker_test_image_hello_world_platform }}"
- name: platform - name: platform
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
pull: true pull: true
@ -3624,7 +3624,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
# Docker daemon only returns 'linux' as the platform for the container, # Docker daemon only returns 'linux' as the platform for the container,
# so this has to be handled correctly by our additional code # so this has to be handled correctly by our additional code
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
platform: linux/amd64 platform: linux/amd64
@ -3634,7 +3634,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
- name: platform (idempotency with shorter name) - name: platform (idempotency with shorter name)
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
platform: linux platform: linux
@ -3644,7 +3644,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
- name: platform (idempotency with shorter name) - name: platform (idempotency with shorter name)
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
platform: amd64 platform: amd64
@ -3654,7 +3654,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
- name: platform (changed) - name: platform (changed)
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
pull: true pull: true
@ -3669,7 +3669,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
- name: platform (idempotency) - name: platform (idempotency)
docker_container: docker_container:
image: hello-world:latest image: "{{ docker_test_image_hello_world_platform }}"
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
pull: true pull: true