From e03431d9f6d90ca219d4b4b62572478c19849aa5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 26 Nov 2020 13:21:12 +0100 Subject: [PATCH] [stable-1] Fix docker tests (#1398) * Adjust version_added, re-place tests. (#34) * Template docker test containers. * Forgot to adjust test. --- .../tasks/tests/comparisons.yml | 56 +-- .../tasks/tests/compatibility.yml | 16 +- .../tasks/tests/image-ids.yml | 47 +- .../tasks/tests/mounts-volumes.yml | 46 +- .../docker_container/tasks/tests/network.yml | 70 +-- .../docker_container/tasks/tests/options.yml | 462 +++++++++--------- .../docker_container/tasks/tests/ports.yml | 30 +- .../regression-45700-dont-parse-on-absent.yml | 2 +- .../tasks/tests/start-stop.yml | 50 +- .../docker_container_info/tasks/main.yml | 2 +- .../docker_host_info/tasks/test_host_info.yml | 2 +- .../targets/docker_image/files/Dockerfile | 3 - .../docker_image/files/StagedDockerfile | 7 - .../targets/docker_image/tasks/test.yml | 15 + .../docker_image/tasks/tests/basic.yml | 24 +- .../docker_image/tasks/tests/docker_image.yml | 19 +- .../docker_image/tasks/tests/old-options.yml | 2 +- .../docker_image/tasks/tests/options.yml | 33 +- .../targets/docker_image/templates/Dockerfile | 3 + .../{files => templates}/EtcHostsDockerfile | 2 +- .../{files => templates}/MyDockerfile | 2 +- .../docker_image/templates/StagedDockerfile | 7 + .../targets/docker_image_info/tasks/main.yml | 20 +- .../docker_network/tasks/tests/basic.yml | 2 +- .../targets/docker_prune/tasks/main.yml | 2 +- .../targets/docker_stack/tasks/test_stack.yml | 4 +- .../stack_compose_base.yml | 2 +- .../stack_compose_overrides.yml | 0 .../targets/docker_stack/vars/main.yml | 2 +- .../tasks/test_stack_info.yml | 4 +- .../stack_compose_base.yml | 2 +- .../stack_compose_overrides.yml | 0 .../targets/docker_stack_info/vars/main.yml | 2 +- .../tasks/test_stack_task_info.yml | 6 +- .../stack_compose_base.yml | 2 +- .../stack_compose_overrides.yml | 0 .../docker_stack_task_info/vars/main.yml | 2 +- .../tasks/tests/configs.yml | 42 +- .../tasks/tests/logging.yml | 20 +- .../docker_swarm_service/tasks/tests/misc.yml | 10 +- .../tasks/tests/mounts.yml | 60 +-- .../tasks/tests/networks.yml | 58 +-- .../tasks/tests/options.yml | 246 +++++----- .../tasks/tests/placement.yml | 26 +- .../tasks/tests/resources.yml | 32 +- .../tasks/tests/restart_config.yml | 32 +- .../tasks/tests/rollback_config.yml | 36 +- .../tasks/tests/secrets.yml | 42 +- .../tasks/tests/update_config.yml | 52 +- .../docker_swarm_service/vars/main.yml | 2 +- .../tasks/test_docker_swarm_service_info.yml | 2 +- .../targets/setup_docker/vars/main.yml | 9 + .../tasks/setup-frontend.yml | 2 +- .../setup_docker_registry/tasks/setup.yml | 2 +- .../setup_docker_registry/vars/main.yml | 1 + 55 files changed, 823 insertions(+), 801 deletions(-) delete mode 100644 tests/integration/targets/docker_image/files/Dockerfile delete mode 100644 tests/integration/targets/docker_image/files/StagedDockerfile create mode 100644 tests/integration/targets/docker_image/templates/Dockerfile rename tests/integration/targets/docker_image/{files => templates}/EtcHostsDockerfile (72%) rename tests/integration/targets/docker_image/{files => templates}/MyDockerfile (67%) create mode 100644 tests/integration/targets/docker_image/templates/StagedDockerfile rename tests/integration/targets/docker_stack/{files => templates}/stack_compose_base.yml (53%) rename tests/integration/targets/docker_stack/{files => templates}/stack_compose_overrides.yml (100%) rename tests/integration/targets/docker_stack_info/{files => templates}/stack_compose_base.yml (53%) rename tests/integration/targets/docker_stack_info/{files => templates}/stack_compose_overrides.yml (100%) rename tests/integration/targets/docker_stack_task_info/{files => templates}/stack_compose_base.yml (53%) rename tests/integration/targets/docker_stack_task_info/{files => templates}/stack_compose_overrides.yml (100%) create mode 100644 tests/integration/targets/setup_docker/vars/main.yml create mode 120000 tests/integration/targets/setup_docker_registry/vars/main.yml diff --git a/tests/integration/targets/docker_container/tasks/tests/comparisons.yml b/tests/integration/targets/docker_container/tasks/tests/comparisons.yml index 8b7ae16bc6..fadf4dc392 100644 --- a/tests/integration/targets/docker_container/tasks/tests/comparisons.yml +++ b/tests/integration/targets/docker_container/tasks/tests/comparisons.yml @@ -12,7 +12,7 @@ - name: value docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -21,7 +21,7 @@ - name: value (change, ignore) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -33,7 +33,7 @@ - name: value (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -62,7 +62,7 @@ - name: list docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -73,7 +73,7 @@ - name: list (change, ignore) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -86,7 +86,7 @@ - name: list (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -116,7 +116,7 @@ - name: set docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -127,7 +127,7 @@ - name: set (change, ignore) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -142,7 +142,7 @@ - name: set (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -157,7 +157,7 @@ - name: set (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -171,7 +171,7 @@ - name: set (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -204,7 +204,7 @@ - name: set(dict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -215,7 +215,7 @@ - name: set(dict) (change, ignore) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -230,7 +230,7 @@ - name: set(dict) (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -245,7 +245,7 @@ - name: set(dict) (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -259,7 +259,7 @@ - name: set(dict) (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -292,7 +292,7 @@ - name: dict docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -303,7 +303,7 @@ - name: dict (change, ignore) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -318,7 +318,7 @@ - name: dict (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -333,7 +333,7 @@ - name: dict (change, allow_more_present) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -347,7 +347,7 @@ - name: dict (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -378,15 +378,15 @@ ## wildcard ######################################################## #################################################################### -- name: Pull hello-world image to make sure wildcard_2 test succeeds +- name: Pull {{ docker_test_image_hello_world }} image to make sure wildcard_2 test succeeds # If the image isn't there, it will pull it and return 'changed'. docker_image: - name: hello-world - pull: true + name: "{{ docker_test_image_hello_world }}" + source: pull - name: wildcard docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -400,7 +400,7 @@ - name: wildcard (change, ignore) docker_container: - image: hello-world + image: "{{ docker_test_image_hello_world }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -416,7 +416,7 @@ - name: wildcard (change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -433,7 +433,7 @@ - name: wildcard (no change, strict) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container/tasks/tests/compatibility.yml b/tests/integration/targets/docker_container/tasks/tests/compatibility.yml index fb537f42b3..de8758aaab 100644 --- a/tests/integration/targets/docker_container/tasks/tests/compatibility.yml +++ b/tests/integration/targets/docker_container/tasks/tests/compatibility.yml @@ -13,7 +13,7 @@ - name: Start container (check) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: compatibility @@ -23,7 +23,7 @@ - name: Start container docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: compatibility @@ -32,7 +32,7 @@ - name: Start container (idempotent) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: compatibility @@ -41,7 +41,7 @@ - name: Start container (idempotent check) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" state: started container_default_behavior: compatibility check_mode: yes @@ -68,7 +68,7 @@ - name: Start container (check) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults @@ -78,7 +78,7 @@ - name: Start container docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults @@ -87,7 +87,7 @@ - name: Start container (idempotent) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults @@ -96,7 +96,7 @@ - name: Start container (idempotent check) docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started container_default_behavior: no_defaults diff --git a/tests/integration/targets/docker_container/tasks/tests/image-ids.yml b/tests/integration/targets/docker_container/tasks/tests/image-ids.yml index f20f2998a3..cd1a739d62 100644 --- a/tests/integration/targets/docker_container/tasks/tests/image-ids.yml +++ b/tests/integration/targets/docker_container/tasks/tests/image-ids.yml @@ -11,16 +11,16 @@ name: "{{ image }}" source: pull loop: - - "hello-world:latest" - - "alpine:3.8" + - "{{ docker_test_image_hello_world }}:latest" + - "{{ docker_test_image_alpine }}" loop_control: loop_var: image -- name: Get image ID of hello-world and alpine images +- name: Get image ID of {{ docker_test_image_hello_world }} and {{ docker_test_image_alpine }} images docker_image_info: name: - - "hello-world:latest" - - "alpine:3.8" + - "{{ docker_test_image_hello_world }}:latest" + - "{{ docker_test_image_alpine }}" register: image_info - assert: @@ -29,9 +29,9 @@ - name: Print image IDs debug: - msg: "hello-world: {{ image_info.images[0].Id }}; alpine: {{ image_info.images[1].Id }}" + msg: "{{ docker_test_image_hello_world }}: {{ image_info.images[0].Id }}; {{ docker_test_image_alpine }}: {{ image_info.images[1].Id }}" -- name: Create container with hello-world image via ID +- name: Create container with {{ docker_test_image_hello_world }} image via ID docker_container: image: "{{ image_info.images[0].Id }}" name: "{{ cname }}" @@ -39,7 +39,7 @@ force_kill: yes register: create_1 -- name: Create container with hello-world image via ID (idempotent) +- name: Create container with {{ docker_test_image_hello_world }} image via ID (idempotent) docker_container: image: "{{ image_info.images[0].Id }}" name: "{{ cname }}" @@ -47,7 +47,7 @@ force_kill: yes register: create_2 -- name: Create container with alpine image via ID +- name: Create container with {{ docker_test_image_alpine }} image via ID docker_container: image: "{{ image_info.images[1].Id }}" name: "{{ cname }}" @@ -55,7 +55,7 @@ force_kill: yes register: create_3 -- name: Create container with alpine image via ID (idempotent) +- name: Create container with {{ docker_test_image_alpine }} image via ID (idempotent) docker_container: image: "{{ image_info.images[1].Id }}" name: "{{ cname }}" @@ -66,21 +66,21 @@ - name: Untag image # Image will not be deleted since the container still uses it docker_image: - name: alpine:3.8 + name: "{{ docker_test_image_alpine }}" force_absent: yes state: absent -- name: Create container with alpine image via name (check mode, will pull, same image) +- name: Create container with {{ docker_test_image_alpine }} image via name (check mode, will pull, same image) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: present register: create_5 check_mode: yes -- name: Create container with alpine image via name (will pull, same image) +- name: Create container with {{ docker_test_image_alpine }} image via name (will pull, same image) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: present register: create_6 @@ -103,30 +103,25 @@ - create_6.container.Image == image_info.images[1].Id - create_6.container.Id == create_4.container.Id # make sure container wasn't recreated -- name: set Digests - set_fact: - digest_hello_world_2016: 0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 - digest_hello_world_2019: 2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535 - -- name: Create container with hello-world image via old digest +- name: Create container with {{ docker_test_image_hello_world }} image via old digest docker_container: - image: "hello-world@sha256:{{ digest_hello_world_2016 }}" + image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v1 }}" name: "{{ cname }}" state: present force_kill: yes register: digest_1 -- name: Create container with hello-world image via old digest (idempotent) +- name: Create container with {{ docker_test_image_hello_world }} image via old digest (idempotent) docker_container: - image: "hello-world@sha256:{{ digest_hello_world_2016 }}" + image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v1 }}" name: "{{ cname }}" state: present force_kill: yes register: digest_2 -- name: Update container with hello-world image via new digest +- name: Update container with {{ docker_test_image_hello_world }} image via new digest docker_container: - image: "hello-world@sha256:{{ digest_hello_world_2019 }}" + image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v2 }}" name: "{{ cname }}" state: present force_kill: yes diff --git a/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml b/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml index b744fcbe0b..dbb3967f45 100644 --- a/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml +++ b/tests/integration/targets/docker_container/tasks/tests/mounts-volumes.yml @@ -20,7 +20,7 @@ - name: mounts docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -37,7 +37,7 @@ - name: mounts (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -54,7 +54,7 @@ - name: mounts (less mounts) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -67,7 +67,7 @@ - name: mounts (more mounts) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -85,7 +85,7 @@ - name: mounts (different modes) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -103,7 +103,7 @@ - name: mounts (endpoint collision) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -149,7 +149,7 @@ - name: mounts + volumes docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -165,7 +165,7 @@ - name: mounts + volumes (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -181,7 +181,7 @@ - name: mounts + volumes (switching) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -198,7 +198,7 @@ - name: mounts + volumes (collision, should fail) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -241,7 +241,7 @@ - name: volume_driver docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" volume_driver: local @@ -250,7 +250,7 @@ - name: volume_driver (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" volume_driver: local @@ -259,7 +259,7 @@ - name: volume_driver (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" volume_driver: / @@ -286,7 +286,7 @@ - name: volumes docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -298,7 +298,7 @@ - name: volumes (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -310,7 +310,7 @@ - name: volumes (less volumes) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -320,7 +320,7 @@ - name: volumes (more volumes) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -332,7 +332,7 @@ - name: volumes (different modes) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -344,7 +344,7 @@ - name: volumes (collision) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -381,7 +381,7 @@ - name: start helpers docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ container_name }}" state: started @@ -395,7 +395,7 @@ - name: volumes_from docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -404,7 +404,7 @@ - name: volumes_from (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -413,7 +413,7 @@ - name: volumes_from (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container/tasks/tests/network.yml b/tests/integration/targets/docker_container/tasks/tests/network.yml index 517aca78e6..0ca341d99e 100644 --- a/tests/integration/targets/docker_container/tasks/tests/network.yml +++ b/tests/integration/targets/docker_container/tasks/tests/network.yml @@ -65,7 +65,7 @@ - name: network_mode docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -74,7 +74,7 @@ - name: network_mode (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -83,7 +83,7 @@ - name: network_mode (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -93,7 +93,7 @@ - name: network_mode (container mode setup) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname_h1 }}" state: started @@ -101,7 +101,7 @@ - name: network_mode (container mode) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -111,7 +111,7 @@ - name: network_mode (container mode idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -150,7 +150,7 @@ - block: - name: networks_cli_compatible=no, networks w/o purge_networks docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -162,7 +162,7 @@ - name: networks_cli_compatible=no, networks w/o purge_networks docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -174,7 +174,7 @@ - name: networks_cli_compatible=no, networks, purge_networks docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -188,7 +188,7 @@ - name: networks_cli_compatible=no, networks, purge_networks (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -201,7 +201,7 @@ - name: networks_cli_compatible=no, networks (less networks) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -212,7 +212,7 @@ - name: networks_cli_compatible=no, networks, purge_networks (less networks) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -225,7 +225,7 @@ - name: networks_cli_compatible=no, networks, purge_networks (more networks) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -292,7 +292,7 @@ - block: - name: networks_cli_compatible=yes, networks specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -307,7 +307,7 @@ - name: networks_cli_compatible=yes, networks specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -326,7 +326,7 @@ - name: networks_cli_compatible=yes, empty networks list specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -336,7 +336,7 @@ - name: networks_cli_compatible=yes, empty networks list specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -346,7 +346,7 @@ - name: networks_cli_compatible=yes, empty networks list specified, purge_networks docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -365,7 +365,7 @@ - name: networks_cli_compatible=yes, networks not specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -375,7 +375,7 @@ - name: networks_cli_compatible=yes, networks not specified docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -384,7 +384,7 @@ - name: networks_cli_compatible=yes, networks not specified, purge_networks docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -446,7 +446,7 @@ - block: - name: create container with one network docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -457,7 +457,7 @@ - name: different networks, comparisons=ignore docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -470,7 +470,7 @@ - name: less networks, comparisons=ignore docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -482,7 +482,7 @@ - name: less networks, comparisons=allow_more_present docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -494,7 +494,7 @@ - name: different networks, comparisons=allow_more_present docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -508,7 +508,7 @@ - name: different networks, comparisons=strict docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -522,7 +522,7 @@ - name: less networks, comparisons=strict docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -580,7 +580,7 @@ - block: - name: create container (stopped) with one network and fixed IP docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: stopped @@ -593,7 +593,7 @@ - name: create container (stopped) with one network and fixed IP (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: stopped @@ -606,7 +606,7 @@ - name: create container (stopped) with one network and fixed IP (different IPv4) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: stopped @@ -619,7 +619,7 @@ - name: create container (stopped) with one network and fixed IP (different IPv6) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: stopped @@ -638,7 +638,7 @@ - name: create container (started) with one network and fixed IP (different IPv4) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -652,7 +652,7 @@ - name: create container (started) with one network and fixed IP (different IPv6) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -666,7 +666,7 @@ - name: create container (started) with one network and fixed IP (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container/tasks/tests/options.yml b/tests/integration/targets/docker_container/tasks/tests/options.yml index 2da58c6a7c..40b4fda093 100644 --- a/tests/integration/targets/docker_container/tasks/tests/options.yml +++ b/tests/integration/targets/docker_container/tasks/tests/options.yml @@ -15,7 +15,7 @@ - name: auto_remove docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "echo"' name: "{{ cname }}" state: started @@ -52,7 +52,7 @@ - name: blkio_weight docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -61,7 +61,7 @@ - name: blkio_weight (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -70,7 +70,7 @@ - name: blkio_weight (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -97,7 +97,7 @@ - name: capabilities, cap_drop docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -109,7 +109,7 @@ - name: capabilities, cap_drop (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -121,7 +121,7 @@ - name: capabilities, cap_drop (less) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -132,7 +132,7 @@ - name: capabilities, cap_drop (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -163,7 +163,7 @@ - name: command docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -v -c "sleep 10m"' name: "{{ cname }}" state: started @@ -171,7 +171,7 @@ - name: command (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -v -c "sleep 10m"' name: "{{ cname }}" state: started @@ -179,7 +179,7 @@ - name: command (less parameters) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -205,7 +205,7 @@ - name: cpu_period docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_period: 90000 @@ -214,7 +214,7 @@ - name: cpu_period (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_period: 90000 @@ -223,7 +223,7 @@ - name: cpu_period (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_period: 50000 @@ -250,7 +250,7 @@ - name: cpu_quota docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_quota: 150000 @@ -259,7 +259,7 @@ - name: cpu_quota (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_quota: 150000 @@ -268,7 +268,7 @@ - name: cpu_quota (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_quota: 50000 @@ -295,7 +295,7 @@ - name: cpu_shares docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_shares: 900 @@ -304,7 +304,7 @@ - name: cpu_shares (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_shares: 900 @@ -313,7 +313,7 @@ - name: cpu_shares (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpu_shares: 1100 @@ -340,7 +340,7 @@ - name: cpuset_cpus docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_cpus: "0" @@ -349,7 +349,7 @@ - name: cpuset_cpus (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_cpus: "0" @@ -358,7 +358,7 @@ - name: cpuset_cpus (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_cpus: "1" @@ -388,7 +388,7 @@ - name: cpuset_mems docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_mems: "0" @@ -397,7 +397,7 @@ - name: cpuset_mems (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_mems: "0" @@ -406,7 +406,7 @@ - name: cpuset_mems (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpuset_mems: "1" @@ -436,7 +436,7 @@ - name: cpus docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpus: 1 @@ -446,7 +446,7 @@ - name: cpus (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpus: 1 @@ -456,7 +456,7 @@ - name: cpus (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" cpus: 1.5 @@ -493,7 +493,7 @@ - name: debug (create) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -509,7 +509,7 @@ - name: debug (stop) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped force_kill: yes @@ -538,7 +538,7 @@ - name: detach without cleanup docker_container: name: "{{ cname }}" - image: hello-world + image: "{{ docker_test_image_hello_world }}" detach: no register: detach_no_cleanup @@ -552,7 +552,7 @@ - name: detach with cleanup docker_container: name: "{{ cname }}" - image: hello-world + image: "{{ docker_test_image_hello_world }}" detach: no cleanup: yes register: detach_cleanup @@ -567,7 +567,7 @@ - name: detach with auto_remove and cleanup docker_container: name: "{{ cname }}" - image: hello-world + image: "{{ docker_test_image_hello_world }}" detach: no auto_remove: yes cleanup: yes @@ -587,6 +587,12 @@ # of hello-world. We don't know why this happens, but it happens # often enough to be annoying. That's why we disable this for now, # and simply test that 'Output' is contained in the result. + # NOTE {{ docker_test_image_hello_world }} is no longer necessarily the + # hello-world image, so we potentially have a different output + # anyway. If someone wants to revive this test, it's probably best + # to keep {{ docker_test_image_hello_world }} as some image that + # has 'echo' and execute 'echo "Hello from Docker!"' or something + # like that. - "'Output' in detach_no_cleanup.container" # - "'Hello from Docker!' in detach_no_cleanup.container.Output" - detach_no_cleanup_cleanup is changed @@ -605,7 +611,7 @@ - name: devices docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -616,7 +622,7 @@ - name: devices (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -627,7 +633,7 @@ - name: devices (less) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -637,7 +643,7 @@ - name: devices (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -667,7 +673,7 @@ - name: device_read_bps docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -681,7 +687,7 @@ - name: device_read_bps (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -695,7 +701,7 @@ - name: device_read_bps (lesser entries) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -707,7 +713,7 @@ - name: device_read_bps (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -747,7 +753,7 @@ - name: device_read_iops docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -761,7 +767,7 @@ - name: device_read_iops (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -775,7 +781,7 @@ - name: device_read_iops (less) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -787,7 +793,7 @@ - name: device_read_iops (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -827,7 +833,7 @@ - name: device_write_bps and device_write_iops docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -842,7 +848,7 @@ - name: device_write_bps and device_write_iops (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -857,7 +863,7 @@ - name: device_write_bps device_write_iops (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -897,7 +903,7 @@ - name: device_requests docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -907,7 +913,7 @@ - name: device_requests (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -941,7 +947,7 @@ - name: dns_opts docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -953,7 +959,7 @@ - name: dns_opts (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -965,7 +971,7 @@ - name: dns_opts (less resolv.conf options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -976,7 +982,7 @@ - name: dns_opts (more resolv.conf options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1014,7 +1020,7 @@ - name: dns_search_domains docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1025,7 +1031,7 @@ - name: dns_search_domains (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1036,7 +1042,7 @@ - name: dns_search_domains (different order) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1048,7 +1054,7 @@ - name: dns_search_domains (changed elements) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1078,7 +1084,7 @@ - name: dns_servers docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1089,7 +1095,7 @@ - name: dns_servers (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1100,7 +1106,7 @@ - name: dns_servers (changed order) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1112,7 +1118,7 @@ - name: dns_servers (changed elements) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1142,7 +1148,7 @@ - name: domainname docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" domainname: example.com @@ -1151,7 +1157,7 @@ - name: domainname (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" domainname: example.com @@ -1160,7 +1166,7 @@ - name: domainname (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" domainname: example.org @@ -1187,7 +1193,7 @@ - name: entrypoint docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" entrypoint: - /bin/sh - "-v" @@ -1199,7 +1205,7 @@ - name: entrypoint (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" entrypoint: - /bin/sh - "-v" @@ -1211,7 +1217,7 @@ - name: entrypoint (change order, should not be idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" entrypoint: - /bin/sh - "-c" @@ -1224,7 +1230,7 @@ - name: entrypoint (less parameters) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" entrypoint: - /bin/sh - "-c" @@ -1236,7 +1242,7 @@ - name: entrypoint (other parameters) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" entrypoint: - /bin/sh - "-c" @@ -1267,7 +1273,7 @@ - name: env docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1281,7 +1287,7 @@ - name: env (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1295,7 +1301,7 @@ - name: env (less environment variables) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1305,7 +1311,7 @@ - name: env (more environment variables) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1317,7 +1323,7 @@ - name: env (fail unwrapped values) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1349,7 +1355,7 @@ - name: env_file docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1358,7 +1364,7 @@ - name: env_file (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1383,7 +1389,7 @@ - name: etc_hosts docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1394,7 +1400,7 @@ - name: etc_hosts (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1405,7 +1411,7 @@ - name: etc_hosts (less hosts) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1415,7 +1421,7 @@ - name: etc_hosts (more hosts) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1445,7 +1451,7 @@ - name: exposed_ports docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1456,7 +1462,7 @@ - name: exposed_ports (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1467,7 +1473,7 @@ - name: exposed_ports (less ports) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1477,7 +1483,7 @@ - name: exposed_ports (more ports) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1513,7 +1519,7 @@ - name: groups docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1524,7 +1530,7 @@ - name: groups (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1535,7 +1541,7 @@ - name: groups (less groups) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1545,7 +1551,7 @@ - name: groups (more groups) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1575,7 +1581,7 @@ - name: healthcheck docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1593,7 +1599,7 @@ - name: healthcheck (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1611,7 +1617,7 @@ - name: healthcheck (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1629,7 +1635,7 @@ - name: healthcheck (no change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1639,7 +1645,7 @@ - name: healthcheck (disabled) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1652,7 +1658,7 @@ - name: healthcheck (disabled, idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1665,7 +1671,7 @@ - name: healthcheck (string in healthcheck test, changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1677,7 +1683,7 @@ - name: healthcheck (string in healthcheck test, idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1718,7 +1724,7 @@ - name: hostname docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" hostname: me.example.com @@ -1727,7 +1733,7 @@ - name: hostname (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" hostname: me.example.com @@ -1736,7 +1742,7 @@ - name: hostname (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" hostname: me.example.org @@ -1763,7 +1769,7 @@ - name: init docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" init: yes @@ -1773,7 +1779,7 @@ - name: init (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" init: yes @@ -1783,7 +1789,7 @@ - name: init (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" init: no @@ -1818,7 +1824,7 @@ - name: interactive docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" interactive: yes @@ -1827,7 +1833,7 @@ - name: interactive (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" interactive: yes @@ -1836,7 +1842,7 @@ - name: interactive (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" interactive: no @@ -1861,15 +1867,15 @@ ## image / ignore_image ############################################ #################################################################### -- name: Pull hello-world image to make sure ignore_image test succeeds +- name: Pull {{ docker_test_image_hello_world }} image to make sure ignore_image test succeeds # If the image isn't there, it will pull it and return 'changed'. docker_image: - name: hello-world - pull: true + name: "{{ docker_test_image_hello_world }}" + source: pull - name: image docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1877,7 +1883,7 @@ - name: image (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1885,7 +1891,7 @@ - name: ignore_image docker_container: - image: hello-world + image: "{{ docker_test_image_hello_world }}" ignore_image: yes name: "{{ cname }}" state: started @@ -1893,7 +1899,7 @@ - name: image change docker_container: - image: hello-world + image: "{{ docker_test_image_hello_world }}" name: "{{ cname }}" state: started force_kill: yes @@ -1919,7 +1925,7 @@ - name: start helpers docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ container_name }}" state: started @@ -1931,7 +1937,7 @@ - name: ipc_mode docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1941,7 +1947,7 @@ - name: ipc_mode (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1951,7 +1957,7 @@ - name: ipc_mode (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -1983,7 +1989,7 @@ - name: kernel_memory docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" kernel_memory: 8M @@ -1993,7 +1999,7 @@ - name: kernel_memory (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" kernel_memory: 8M @@ -2003,7 +2009,7 @@ - name: kernel_memory (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" kernel_memory: 6M @@ -2039,7 +2045,7 @@ - name: labels docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2050,7 +2056,7 @@ - name: labels (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2061,7 +2067,7 @@ - name: labels (less labels) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2071,7 +2077,7 @@ - name: labels (more labels) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2101,7 +2107,7 @@ - name: start helpers docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ container_name }}" state: started @@ -2114,7 +2120,7 @@ - name: links docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2125,7 +2131,7 @@ - name: links (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2136,7 +2142,7 @@ - name: links (less links) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2146,7 +2152,7 @@ - name: links (more links) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2183,7 +2189,7 @@ - name: log_driver docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2192,7 +2198,7 @@ - name: log_driver (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2201,7 +2207,7 @@ - name: log_driver (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2228,7 +2234,7 @@ - name: log_options docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2241,7 +2247,7 @@ - name: log_options (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2254,7 +2260,7 @@ - name: log_options (less log options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2265,7 +2271,7 @@ - name: log_options (more log options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2298,7 +2304,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: mac_address docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" mac_address: 92:d0:c6:0a:29:33 @@ -2307,7 +2313,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: mac_address (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" mac_address: 92:d0:c6:0a:29:33 @@ -2316,7 +2322,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: mac_address (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" mac_address: 92:d0:c6:0a:29:44 @@ -2343,7 +2349,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory: 64M @@ -2352,7 +2358,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory: 64M @@ -2361,7 +2367,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory: 48M @@ -2388,7 +2394,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_reservation docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_reservation: 64M @@ -2397,7 +2403,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_reservation (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_reservation: 64M @@ -2406,7 +2412,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_reservation (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_reservation: 48M @@ -2433,7 +2439,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swap docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" # Docker daemon does not accept memory_swap if memory is not specified @@ -2445,7 +2451,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swap (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" # Docker daemon does not accept memory_swap if memory is not specified @@ -2457,7 +2463,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swap (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" # Docker daemon does not accept memory_swap if memory is not specified @@ -2496,7 +2502,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swappiness docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_swappiness: 40 @@ -2505,7 +2511,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swappiness (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_swappiness: 40 @@ -2514,7 +2520,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: memory_swappiness (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" memory_swappiness: 60 @@ -2541,7 +2547,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_killer docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_killer: yes @@ -2550,7 +2556,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_killer (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_killer: yes @@ -2559,7 +2565,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_killer (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_killer: no @@ -2586,7 +2592,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_score_adj docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_score_adj: 5 @@ -2595,7 +2601,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_score_adj (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_score_adj: 5 @@ -2604,7 +2610,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: oom_score_adj (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" oom_score_adj: 7 @@ -2637,7 +2643,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: paused docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started @@ -2651,7 +2657,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: paused (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started @@ -2661,7 +2667,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: paused (continue) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: "/bin/sh -c 'sleep 10m'" name: "{{ cname }}" state: started @@ -2694,7 +2700,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: start helpers docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname_h1 }}" state: started @@ -2702,7 +2708,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pid_mode docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2713,7 +2719,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pid_mode (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2724,7 +2730,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pid_mode (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2763,7 +2769,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pids_limit docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2773,7 +2779,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pids_limit (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2783,7 +2789,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: pids_limit (changed) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2818,7 +2824,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: privileged docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" privileged: yes @@ -2827,7 +2833,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: privileged (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" privileged: yes @@ -2836,7 +2842,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: privileged (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" privileged: no @@ -2863,7 +2869,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2874,7 +2880,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2885,7 +2891,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports (less published_ports) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2895,7 +2901,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports (more published_ports) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2907,7 +2913,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports (ports with IP addresses) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2919,7 +2925,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: published_ports (no published ports) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -2957,7 +2963,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: read_only docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" read_only: yes @@ -2966,7 +2972,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: read_only (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" read_only: yes @@ -2975,7 +2981,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: read_only (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" read_only: no @@ -3002,7 +3008,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_policy docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: always @@ -3011,7 +3017,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_policy (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: always @@ -3020,7 +3026,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_policy (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: unless-stopped @@ -3047,7 +3053,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_retries docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: on-failure @@ -3057,7 +3063,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_retries (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: on-failure @@ -3067,7 +3073,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: restart_retries (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart_policy: on-failure @@ -3095,7 +3101,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: runtime docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" runtime: runc @@ -3105,7 +3111,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: runtime (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" runtime: runc @@ -3154,7 +3160,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: security_opts docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3165,7 +3171,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: security_opts (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3176,7 +3182,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: security_opts (less security options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3186,7 +3192,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: security_opts (more security options) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3216,7 +3222,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: shm_size docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" shm_size: 96M @@ -3225,7 +3231,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: shm_size (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" shm_size: 96M @@ -3234,7 +3240,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: shm_size (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" shm_size: 75M @@ -3261,7 +3267,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_signal docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_signal: "30" @@ -3270,7 +3276,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_signal (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_signal: "30" @@ -3279,7 +3285,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_signal (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_signal: "9" @@ -3306,7 +3312,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_timeout docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_timeout: 2 @@ -3315,7 +3321,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_timeout (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_timeout: 2 @@ -3325,7 +3331,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: stop_timeout (no change) # stop_timeout changes are ignored by default docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" stop_timeout: 1 @@ -3361,7 +3367,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: sysctls docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3373,7 +3379,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: sysctls (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3385,7 +3391,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: sysctls (less sysctls) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3396,7 +3402,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: sysctls (more sysctls) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3434,7 +3440,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tmpfs docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3445,7 +3451,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tmpfs (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3456,7 +3462,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tmpfs (less tmpfs) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3466,7 +3472,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tmpfs (more tmpfs) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3496,7 +3502,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tty docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" tty: yes @@ -3505,7 +3511,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tty (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" tty: yes @@ -3514,7 +3520,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: tty (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" tty: no @@ -3541,7 +3547,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: ulimits docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3552,7 +3558,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: ulimits (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3563,7 +3569,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: ulimits (less ulimits) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3573,7 +3579,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: ulimits (more ulimits) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -3603,7 +3609,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: user docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" user: nobody @@ -3612,7 +3618,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: user (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" user: nobody @@ -3621,7 +3627,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: user (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" user: root @@ -3648,7 +3654,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: userns_mode docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" userns_mode: host @@ -3658,7 +3664,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: userns_mode (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" userns_mode: host @@ -3668,7 +3674,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: userns_mode (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" userns_mode: "" @@ -3703,7 +3709,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: uts docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" uts: host @@ -3713,7 +3719,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: uts (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" uts: host @@ -3723,7 +3729,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: uts (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" uts: "" @@ -3758,7 +3764,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: working_dir docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" working_dir: /tmp @@ -3767,7 +3773,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: working_dir (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" working_dir: /tmp @@ -3776,7 +3782,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings" - name: working_dir (change) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" working_dir: / diff --git a/tests/integration/targets/docker_container/tasks/tests/ports.yml b/tests/integration/targets/docker_container/tasks/tests/ports.yml index e60fb3245a..895cd236f0 100644 --- a/tests/integration/targets/docker_container/tasks/tests/ports.yml +++ b/tests/integration/targets/docker_container/tasks/tests/ports.yml @@ -13,7 +13,7 @@ - name: published_ports -- all docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -27,7 +27,7 @@ - name: published_ports -- all (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -41,7 +41,7 @@ - name: published_ports -- all (writing out 'all') docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -56,7 +56,7 @@ - name: published_ports -- all (idempotency 2) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -71,7 +71,7 @@ - name: published_ports -- all (switching back to 'all') docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -104,7 +104,7 @@ - name: published_ports -- port range docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -119,7 +119,7 @@ - name: published_ports -- port range (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -134,7 +134,7 @@ - name: published_ports -- port range (different range) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -166,7 +166,7 @@ - name: published_ports -- one-element container port range docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ item }}" state: started @@ -180,7 +180,7 @@ - name: published_ports -- one-element container port range (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ item }}" state: started @@ -194,7 +194,7 @@ - name: published_ports -- one-element container port range (different range) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ item }}" state: started @@ -228,7 +228,7 @@ - name: published_ports -- IPv6 docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -239,7 +239,7 @@ - name: published_ports -- IPv6 (idempotency) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -250,7 +250,7 @@ - name: published_ports -- IPv6 (different IP) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -261,7 +261,7 @@ - name: published_ports -- IPv6 (hostname) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml b/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml index bb7b1f2b5c..d515015359 100644 --- a/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml +++ b/tests/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml @@ -9,7 +9,7 @@ - name: Start container docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container/tasks/tests/start-stop.yml b/tests/integration/targets/docker_container/tasks/tests/start-stop.yml index c794d5f52a..ec9de7c525 100644 --- a/tests/integration/targets/docker_container/tasks/tests/start-stop.yml +++ b/tests/integration/targets/docker_container/tasks/tests/start-stop.yml @@ -12,7 +12,7 @@ - name: Create container (check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -21,7 +21,7 @@ - name: Create container docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -29,7 +29,7 @@ - name: Create container (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -37,7 +37,7 @@ - name: Create container (idempotent check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -94,7 +94,7 @@ - name: Present check for running container (check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -103,7 +103,7 @@ - name: Present check for running container docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -126,7 +126,7 @@ - name: Start container from scratch (check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' stop_timeout: 1 name: "{{ cname }}" @@ -136,7 +136,7 @@ - name: Start container from scratch docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' stop_timeout: 1 name: "{{ cname }}" @@ -145,7 +145,7 @@ - name: Start container from scratch (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' stop_timeout: 1 name: "{{ cname }}" @@ -154,7 +154,7 @@ - name: Start container from scratch (idempotent check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' stop_timeout: 1 name: "{{ cname }}" @@ -175,7 +175,7 @@ - name: Recreating container (created) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: present @@ -184,7 +184,7 @@ - name: Recreating container (created, recreate, check mode) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" recreate: yes @@ -195,7 +195,7 @@ - name: Recreating container (created, recreate) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" recreate: yes @@ -205,7 +205,7 @@ - name: Recreating container (started) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -214,7 +214,7 @@ - name: Recreating container (started, recreate, check mode) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" recreate: yes @@ -226,7 +226,7 @@ - name: Recreating container (started, recreate) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" recreate: yes @@ -266,7 +266,7 @@ - name: Restarting docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -277,7 +277,7 @@ - name: Restarting (restart, check mode) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart: yes @@ -289,7 +289,7 @@ - name: Restarting (restart) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" restart: yes @@ -300,7 +300,7 @@ - name: Restarting (verify volumes) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started @@ -330,7 +330,7 @@ - name: Stop container (check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped stop_timeout: 1 @@ -339,7 +339,7 @@ - name: Stop container docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped stop_timeout: 1 @@ -347,7 +347,7 @@ - name: Stop container (idempotent) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped stop_timeout: 1 @@ -355,7 +355,7 @@ - name: Stop container (idempotent check) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" name: "{{ cname }}" state: stopped stop_timeout: 1 @@ -412,7 +412,7 @@ - name: Start container (setup for removing from running) docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_container_info/tasks/main.yml b/tests/integration/targets/docker_container_info/tasks/main.yml index 5e0b1c74e4..8ecf2de3b3 100644 --- a/tests/integration/targets/docker_container_info/tasks/main.yml +++ b/tests/integration/targets/docker_container_info/tasks/main.yml @@ -29,7 +29,7 @@ - name: Make sure container exists docker_container: name: "{{ cname }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' state: started force_kill: yes diff --git a/tests/integration/targets/docker_host_info/tasks/test_host_info.yml b/tests/integration/targets/docker_host_info/tasks/test_host_info.yml index 8e2b1e0dcd..ef2a58a618 100644 --- a/tests/integration/targets/docker_host_info/tasks/test_host_info.yml +++ b/tests/integration/targets/docker_host_info/tasks/test_host_info.yml @@ -28,7 +28,7 @@ # * network list is always non-empty (default networks). - name: Create container docker_container: - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -c "sleep 10m"' name: "{{ cname }}" state: started diff --git a/tests/integration/targets/docker_image/files/Dockerfile b/tests/integration/targets/docker_image/files/Dockerfile deleted file mode 100644 index c2951375fa..0000000000 --- a/tests/integration/targets/docker_image/files/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM busybox -ENV foo /bar -WORKDIR ${foo} diff --git a/tests/integration/targets/docker_image/files/StagedDockerfile b/tests/integration/targets/docker_image/files/StagedDockerfile deleted file mode 100644 index ebc4df42f0..0000000000 --- a/tests/integration/targets/docker_image/files/StagedDockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM busybox AS first -ENV dir /first -WORKDIR ${dir} - -FROM busybox AS second -ENV dir /second -WORKDIR ${dir} diff --git a/tests/integration/targets/docker_image/tasks/test.yml b/tests/integration/targets/docker_image/tasks/test.yml index 47c629860b..023f8ccd71 100644 --- a/tests/integration/targets/docker_image/tasks/test.yml +++ b/tests/integration/targets/docker_image/tasks/test.yml @@ -10,6 +10,21 @@ - debug: msg: "Using name prefix {{ name_prefix }}" +- name: Create files directory + file: + path: '{{ output_dir }}/files' + state: directory + +- name: Template files + template: + src: '{{ item }}' + dest: '{{ output_dir }}/files/{{ item }}' + loop: + - Dockerfile + - EtcHostsDockerfile + - MyDockerfile + - StagedDockerfile + - block: - include_tasks: run-test.yml with_fileglob: diff --git a/tests/integration/targets/docker_image/tasks/tests/basic.yml b/tests/integration/targets/docker_image/tasks/tests/basic.yml index 6f0bdd6935..91932672fc 100644 --- a/tests/integration/targets/docker_image/tasks/tests/basic.yml +++ b/tests/integration/targets/docker_image/tasks/tests/basic.yml @@ -5,14 +5,14 @@ - name: Make sure image is not there docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" state: absent force_absent: yes register: absent_1 - name: Make sure image is not there (idempotency) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" state: absent register: absent_2 @@ -22,14 +22,14 @@ - name: Make sure image is there docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" state: present source: pull register: present_1 - name: Make sure image is there (idempotent) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" state: present source: pull register: present_2 @@ -41,28 +41,28 @@ - name: Make sure tag is not there docker_image: - name: "hello-world:alias" + name: "{{ docker_test_image_hello_world }}:alias" state: absent - name: Tag image with alias docker_image: source: local - name: "hello-world:latest" - repository: "hello-world:alias" + name: "{{ docker_test_image_hello_world }}:latest" + repository: "{{ docker_test_image_hello_world }}:alias" register: tag_1 - name: Tag image with alias (idempotent) docker_image: source: local - name: "hello-world:latest" - repository: "hello-world:alias" + name: "{{ docker_test_image_hello_world }}:latest" + repository: "{{ docker_test_image_hello_world }}:alias" register: tag_2 - name: Tag image with alias (force, still idempotent) docker_image: source: local - name: "hello-world:latest" - repository: "hello-world:alias" + name: "{{ docker_test_image_hello_world }}:latest" + repository: "{{ docker_test_image_hello_world }}:alias" force_tag: yes register: tag_3 @@ -74,5 +74,5 @@ - name: Cleanup alias tag docker_image: - name: "hello-world:alias" + name: "{{ docker_test_image_hello_world }}:alias" state: absent diff --git a/tests/integration/targets/docker_image/tasks/tests/docker_image.yml b/tests/integration/targets/docker_image/tasks/tests/docker_image.yml index 3cb45d0166..9f5b20c74f 100644 --- a/tests/integration/targets/docker_image/tasks/tests/docker_image.yml +++ b/tests/integration/targets/docker_image/tasks/tests/docker_image.yml @@ -22,14 +22,14 @@ state: absent force_absent: yes -- name: Make sure we have hello-world:latest +- name: Make sure we have {{ docker_test_image_hello_world }}:latest docker_image: - name: hello-world:latest + name: "{{ docker_test_image_hello_world }}:latest" source: pull - name: Push image to test registry docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" repository: "{{ hello_world_image_base }}" push: yes source: local @@ -37,7 +37,7 @@ - name: Push image to test registry (idempotent) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" repository: "{{ hello_world_image_base }}" push: yes source: local @@ -45,7 +45,7 @@ - name: Push image to test registry (force, still idempotent) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" repository: "{{ hello_world_image_base }}" push: yes source: local @@ -115,7 +115,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" pull: no repository: "{{ test_image_base }}" source: build @@ -125,7 +125,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" pull: no repository: "{{ test_image_base }}" source: build @@ -136,11 +136,6 @@ - repository_1 is changed - repository_2 is not changed -# Uncomment in community.docker -# - assert: -# that: -# - 'FROM busybox' in repository_1.stdout - - name: Get facts of image docker_image_info: name: "{{ test_image_base }}:latest" diff --git a/tests/integration/targets/docker_image/tasks/tests/old-options.yml b/tests/integration/targets/docker_image/tasks/tests/old-options.yml index 892a21e6e5..05587e11b2 100644 --- a/tests/integration/targets/docker_image/tasks/tests/old-options.yml +++ b/tests/integration/targets/docker_image/tasks/tests/old-options.yml @@ -14,7 +14,7 @@ - name: build with old-style options docker_image: name: "{{ iname }}" - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: Dockerfile http_timeout: 60 nocache: yes diff --git a/tests/integration/targets/docker_image/tasks/tests/options.yml b/tests/integration/targets/docker_image/tasks/tests/options.yml index f21bbda910..9ae9303173 100644 --- a/tests/integration/targets/docker_image/tasks/tests/options.yml +++ b/tests/integration/targets/docker_image/tasks/tests/options.yml @@ -22,7 +22,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" args: TEST1: val1 TEST2: val2 @@ -35,7 +35,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" args: TEST1: val1 TEST2: val2 @@ -70,7 +70,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" container_limits: memory: 4000 pull: no @@ -82,7 +82,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" container_limits: memory: 5000000 memswap: 7000000 @@ -115,7 +115,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: "MyDockerfile" pull: no source: build @@ -130,6 +130,7 @@ - assert: that: - dockerfile_1 is changed + - "('FROM ' ~ docker_test_image_alpine) in dockerfile_1.stdout" - dockerfile_1['image']['Config']['WorkingDir'] == '/newdata' #################################################################### @@ -140,7 +141,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" pull: no source: build @@ -148,7 +149,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: "MyDockerfile" pull: no source: build @@ -159,7 +160,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: "MyDockerfile" pull: no source: build @@ -183,27 +184,27 @@ - name: Archive image docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" archive_path: "{{ output_dir }}/image.tar" source: pull register: archive_image - name: remove image docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" state: absent force_absent: yes - name: load image (changed) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" load_path: "{{ output_dir }}/image.tar" source: load register: load_image - name: load image (idempotency) docker_image: - name: "hello-world:latest" + name: "{{ docker_test_image_hello_world }}:latest" load_path: "{{ output_dir }}/image.tar" source: load register: load_image_1 @@ -222,7 +223,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" pull: no source: build register: path_1 @@ -231,7 +232,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" pull: no source: build register: path_2 @@ -255,7 +256,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: "StagedDockerfile" target: first pull: no @@ -281,7 +282,7 @@ docker_image: name: "{{ iname }}" build: - path: "{{ role_path }}/files" + path: "{{ output_dir }}/files" dockerfile: "EtcHostsDockerfile" pull: no etc_hosts: diff --git a/tests/integration/targets/docker_image/templates/Dockerfile b/tests/integration/targets/docker_image/templates/Dockerfile new file mode 100644 index 0000000000..c50329448d --- /dev/null +++ b/tests/integration/targets/docker_image/templates/Dockerfile @@ -0,0 +1,3 @@ +FROM {{ docker_test_image_busybox }} +ENV foo /bar +WORKDIR ${foo} diff --git a/tests/integration/targets/docker_image/files/EtcHostsDockerfile b/tests/integration/targets/docker_image/templates/EtcHostsDockerfile similarity index 72% rename from tests/integration/targets/docker_image/files/EtcHostsDockerfile rename to tests/integration/targets/docker_image/templates/EtcHostsDockerfile index 2dc01fadaa..f1b54e3bc8 100644 --- a/tests/integration/targets/docker_image/files/EtcHostsDockerfile +++ b/tests/integration/targets/docker_image/templates/EtcHostsDockerfile @@ -1,3 +1,3 @@ -FROM busybox +FROM {{ docker_test_image_busybox }} # This should fail building if docker cannot resolve some-custom-host RUN ping -c1 some-custom-host diff --git a/tests/integration/targets/docker_image/files/MyDockerfile b/tests/integration/targets/docker_image/templates/MyDockerfile similarity index 67% rename from tests/integration/targets/docker_image/files/MyDockerfile rename to tests/integration/targets/docker_image/templates/MyDockerfile index 605e8e0f8a..68bca8a2aa 100644 --- a/tests/integration/targets/docker_image/files/MyDockerfile +++ b/tests/integration/targets/docker_image/templates/MyDockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.7 +FROM {{ docker_test_image_alpine }} ENV INSTALL_PATH /newdata RUN mkdir -p $INSTALL_PATH diff --git a/tests/integration/targets/docker_image/templates/StagedDockerfile b/tests/integration/targets/docker_image/templates/StagedDockerfile new file mode 100644 index 0000000000..fc4623a394 --- /dev/null +++ b/tests/integration/targets/docker_image/templates/StagedDockerfile @@ -0,0 +1,7 @@ +FROM {{ docker_test_image_busybox }} AS first +ENV dir /first +WORKDIR ${dir} + +FROM {{ docker_test_image_busybox }} AS second +ENV dir /second +WORKDIR ${dir} diff --git a/tests/integration/targets/docker_image_info/tasks/main.yml b/tests/integration/targets/docker_image_info/tasks/main.yml index 1c5a60d588..cf07116a92 100644 --- a/tests/integration/targets/docker_image_info/tasks/main.yml +++ b/tests/integration/targets/docker_image_info/tasks/main.yml @@ -7,12 +7,12 @@ - block: - name: Make sure image is not there docker_image: - name: alpine:3.7 + name: "{{ docker_test_image_alpine_different }}" state: absent - name: Inspect a non-available image docker_image_info: - name: alpine:3.7 + name: "{{ docker_test_image_alpine_different }}" register: result - assert: @@ -25,24 +25,24 @@ source: pull state: present loop: - - "hello-world:latest" - - "alpine:3.8" + - "{{ docker_test_image_hello_world }}:latest" + - "{{ docker_test_image_alpine }}" - name: Inspect an available image docker_image_info: - name: hello-world:latest + name: "{{ docker_test_image_hello_world }}:latest" register: result - assert: that: - "result.images|length == 1" - - "'hello-world:latest' in result.images[0].RepoTags" + - "(docker_test_image_hello_world ~ ':latest') in result.images[0].RepoTags" - name: Inspect multiple images docker_image_info: name: - - "hello-world:latest" - - "alpine:3.8" + - "{{ docker_test_image_hello_world }}:latest" + - "{{ docker_test_image_alpine }}" register: result - debug: var=result @@ -50,8 +50,8 @@ - assert: that: - "result.images|length == 2" - - "'hello-world:latest' in result.images[0].RepoTags" - - "'alpine:3.8' in result.images[1].RepoTags" + - "(docker_test_image_hello_world ~ ':latest') in result.images[0].RepoTags" + - "docker_test_image_alpine in result.images[1].RepoTags" when: docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.20', '>=') diff --git a/tests/integration/targets/docker_network/tasks/tests/basic.yml b/tests/integration/targets/docker_network/tasks/tests/basic.yml index 89462d68e5..e6290715b8 100644 --- a/tests/integration/targets/docker_network/tasks/tests/basic.yml +++ b/tests/integration/targets/docker_network/tasks/tests/basic.yml @@ -14,7 +14,7 @@ - name: Create containers docker_container: name: "{{ container_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: /bin/sleep 10m state: started loop: diff --git a/tests/integration/targets/docker_prune/tasks/main.yml b/tests/integration/targets/docker_prune/tasks/main.yml index a1f09b7d21..16c4aa058d 100644 --- a/tests/integration/targets/docker_prune/tasks/main.yml +++ b/tests/integration/targets/docker_prune/tasks/main.yml @@ -14,7 +14,7 @@ # Create objects to be pruned - docker_container: name: "{{ cname }}" - image: hello-world + image: "{{ docker_test_image_hello_world }}" state: present register: container - docker_network: diff --git a/tests/integration/targets/docker_stack/tasks/test_stack.yml b/tests/integration/targets/docker_stack/tasks/test_stack.yml index 742c87e4c9..d1f332c274 100644 --- a/tests/integration/targets/docker_stack/tasks/test_stack.yml +++ b/tests/integration/targets/docker_stack/tasks/test_stack.yml @@ -45,8 +45,8 @@ name: test_stack absent_retries: 30 - - name: Copy compose files - copy: + - name: Template compose files + template: src: "{{item}}" dest: "{{output_dir}}/" with_items: diff --git a/tests/integration/targets/docker_stack/files/stack_compose_base.yml b/tests/integration/targets/docker_stack/templates/stack_compose_base.yml similarity index 53% rename from tests/integration/targets/docker_stack/files/stack_compose_base.yml rename to tests/integration/targets/docker_stack/templates/stack_compose_base.yml index 4a3e7963b4..a0a33c4314 100644 --- a/tests/integration/targets/docker_stack/files/stack_compose_base.yml +++ b/tests/integration/targets/docker_stack/templates/stack_compose_base.yml @@ -1,5 +1,5 @@ version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 diff --git a/tests/integration/targets/docker_stack/files/stack_compose_overrides.yml b/tests/integration/targets/docker_stack/templates/stack_compose_overrides.yml similarity index 100% rename from tests/integration/targets/docker_stack/files/stack_compose_overrides.yml rename to tests/integration/targets/docker_stack/templates/stack_compose_overrides.yml diff --git a/tests/integration/targets/docker_stack/vars/main.yml b/tests/integration/targets/docker_stack/vars/main.yml index 0872f23784..b6f1cf1649 100644 --- a/tests/integration/targets/docker_stack/vars/main.yml +++ b/tests/integration/targets/docker_stack/vars/main.yml @@ -2,7 +2,7 @@ stack_compose_base: version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 stack_compose_overrides: diff --git a/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml b/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml index 1754312a27..a2a39727ce 100644 --- a/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml +++ b/tests/integration/targets/docker_stack_info/tasks/test_stack_info.yml @@ -31,8 +31,8 @@ - 'output.results | type_debug == "list"' - 'output.results | length == 0' - - name: Copy compose files - copy: + - name: Template compose files + template: src: "{{ item }}" dest: "{{ output_dir }}/" with_items: diff --git a/tests/integration/targets/docker_stack_info/files/stack_compose_base.yml b/tests/integration/targets/docker_stack_info/templates/stack_compose_base.yml similarity index 53% rename from tests/integration/targets/docker_stack_info/files/stack_compose_base.yml rename to tests/integration/targets/docker_stack_info/templates/stack_compose_base.yml index 4a3e7963b4..a0a33c4314 100644 --- a/tests/integration/targets/docker_stack_info/files/stack_compose_base.yml +++ b/tests/integration/targets/docker_stack_info/templates/stack_compose_base.yml @@ -1,5 +1,5 @@ version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 diff --git a/tests/integration/targets/docker_stack_info/files/stack_compose_overrides.yml b/tests/integration/targets/docker_stack_info/templates/stack_compose_overrides.yml similarity index 100% rename from tests/integration/targets/docker_stack_info/files/stack_compose_overrides.yml rename to tests/integration/targets/docker_stack_info/templates/stack_compose_overrides.yml diff --git a/tests/integration/targets/docker_stack_info/vars/main.yml b/tests/integration/targets/docker_stack_info/vars/main.yml index 0872f23784..b6f1cf1649 100644 --- a/tests/integration/targets/docker_stack_info/vars/main.yml +++ b/tests/integration/targets/docker_stack_info/vars/main.yml @@ -2,7 +2,7 @@ stack_compose_base: version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 stack_compose_overrides: diff --git a/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml b/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml index 8110c25945..741cce68e5 100644 --- a/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml +++ b/tests/integration/targets/docker_stack_task_info/tasks/test_stack_task_info.yml @@ -31,8 +31,8 @@ - 'output.results | type_debug == "list"' - 'output.results | length == 0' - - name: Copy compose files - copy: + - name: Template compose files + template: src: "{{ item }}" dest: "{{ output_dir }}/" with_items: @@ -74,7 +74,7 @@ that: - 'output.results | type_debug == "list"' - 'output.results[0].DesiredState == "Running"' - - 'output.results[0].Image == "busybox:latest"' + - 'output.results[0].Image == docker_test_image_busybox ~ ":latest"' - 'output.results[0].Name == "test_stack_busybox.1"' always: diff --git a/tests/integration/targets/docker_stack_task_info/files/stack_compose_base.yml b/tests/integration/targets/docker_stack_task_info/templates/stack_compose_base.yml similarity index 53% rename from tests/integration/targets/docker_stack_task_info/files/stack_compose_base.yml rename to tests/integration/targets/docker_stack_task_info/templates/stack_compose_base.yml index 4a3e7963b4..a0a33c4314 100644 --- a/tests/integration/targets/docker_stack_task_info/files/stack_compose_base.yml +++ b/tests/integration/targets/docker_stack_task_info/templates/stack_compose_base.yml @@ -1,5 +1,5 @@ version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 diff --git a/tests/integration/targets/docker_stack_task_info/files/stack_compose_overrides.yml b/tests/integration/targets/docker_stack_task_info/templates/stack_compose_overrides.yml similarity index 100% rename from tests/integration/targets/docker_stack_task_info/files/stack_compose_overrides.yml rename to tests/integration/targets/docker_stack_task_info/templates/stack_compose_overrides.yml diff --git a/tests/integration/targets/docker_stack_task_info/vars/main.yml b/tests/integration/targets/docker_stack_task_info/vars/main.yml index 0872f23784..b6f1cf1649 100644 --- a/tests/integration/targets/docker_stack_task_info/vars/main.yml +++ b/tests/integration/targets/docker_stack_task_info/vars/main.yml @@ -2,7 +2,7 @@ stack_compose_base: version: '3' services: busybox: - image: busybox:latest + image: "{{ docker_test_image_busybox }}:latest" command: sleep 3600 stack_compose_overrides: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml index db474ba0b7..ad4d5695a1 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/configs.yml @@ -31,7 +31,7 @@ - name: configs docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -44,7 +44,7 @@ - name: configs (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -56,7 +56,7 @@ - name: configs (add) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -71,7 +71,7 @@ - name: configs (add idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -86,7 +86,7 @@ - name: configs (add idempotency no id) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -100,7 +100,7 @@ - name: configs (add idempotency no id and re-ordered) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -114,7 +114,7 @@ - name: configs (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: [] @@ -124,7 +124,7 @@ - name: configs (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: [] @@ -162,7 +162,7 @@ - name: configs (uid int) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -175,7 +175,7 @@ - name: configs (uid int idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -188,7 +188,7 @@ - name: configs (uid int change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -201,7 +201,7 @@ - name: configs (uid str) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -214,7 +214,7 @@ - name: configs (uid str idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -252,7 +252,7 @@ - name: configs (gid int) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -265,7 +265,7 @@ - name: configs (gid int idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -278,7 +278,7 @@ - name: configs (gid int change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -291,7 +291,7 @@ - name: configs (gid str) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -304,7 +304,7 @@ - name: configs (gid str idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -341,7 +341,7 @@ - name: configs (mode) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -354,7 +354,7 @@ - name: configs (mode idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: @@ -367,7 +367,7 @@ - name: configs (mode change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' configs: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml index 88e7b561c9..79014dd5c2 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/logging.yml @@ -15,7 +15,7 @@ - name: logging.driver docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -25,7 +25,7 @@ - name: logging.driver (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -35,7 +35,7 @@ - name: log_driver (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' log_driver: json-file @@ -44,7 +44,7 @@ - name: logging.driver (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -71,7 +71,7 @@ - name: logging_options docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -84,7 +84,7 @@ - name: logging_options (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -97,7 +97,7 @@ - name: log_driver_options (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' log_driver: json-file @@ -109,7 +109,7 @@ - name: logging_options (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -123,7 +123,7 @@ - name: logging_options (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: @@ -134,7 +134,7 @@ - name: logging_options (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' logging: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml index cf75183171..7d24e08904 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/misc.yml @@ -28,7 +28,7 @@ docker_swarm_service: name: test_service endpoint_mode: dnsrr - image: busybox + image: "{{ docker_test_image_busybox }}" resolve_image: no args: - sleep @@ -43,7 +43,7 @@ register: output docker_swarm_service: name: test_service - image: busybox + image: "{{ docker_test_image_busybox }}" resolve_image: no args: - sleep @@ -58,7 +58,7 @@ register: output docker_swarm_service: name: test_service - image: busybox + image: "{{ docker_test_image_busybox }}" resolve_image: no endpoint_mode: vip mode: global @@ -75,7 +75,7 @@ register: output docker_swarm_service: name: test_service - image: busybox + image: "{{ docker_test_image_busybox }}" resolve_image: no mode: global args: @@ -92,7 +92,7 @@ - name: fake image key as it is not predictable set_fact: - ansible_docker_service_output: "{{ output.swarm_service|combine({'image': 'busybox'}) }}" + ansible_docker_service_output: "{{ output.swarm_service|combine({'image': docker_test_image_busybox}) }}" - name: assert service matches expectations assert: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml index 08ffc92758..441547d984 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/mounts.yml @@ -25,7 +25,7 @@ - name: mounts docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -37,7 +37,7 @@ - name: mounts (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -49,7 +49,7 @@ - name: mounts (add) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -64,7 +64,7 @@ - name: mounts (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -79,7 +79,7 @@ - name: mounts (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: [] @@ -88,7 +88,7 @@ - name: mounts (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: [] @@ -116,7 +116,7 @@ - name: mounts.readonly docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -129,7 +129,7 @@ - name: mounts.readonly (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -141,7 +141,7 @@ - name: mounts.readonly (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -169,7 +169,7 @@ - name: mounts.propagation docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -183,7 +183,7 @@ - name: mounts.propagation (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -196,7 +196,7 @@ - name: mounts.propagation (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -225,7 +225,7 @@ - name: mounts.labels docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -241,7 +241,7 @@ - name: mounts.labels (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -256,7 +256,7 @@ - name: mounts.labels (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -286,7 +286,7 @@ - name: mounts.no_copy docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -300,7 +300,7 @@ - name: mounts.no_copy (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -313,7 +313,7 @@ - name: mounts.no_copy (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -342,7 +342,7 @@ - name: mounts.driver_config docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -358,7 +358,7 @@ - name: mounts.driver_config docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -374,7 +374,7 @@ - name: mounts.driver_config docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -404,7 +404,7 @@ - name: mounts.tmpfs_size docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -418,7 +418,7 @@ - name: mounts.tmpfs_size (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -432,7 +432,7 @@ - name: mounts.tmpfs_size (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -468,7 +468,7 @@ - name: mounts.tmpfs_mode docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -482,7 +482,7 @@ - name: mounts.tmpfs_mode (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -496,7 +496,7 @@ - name: mounts.tmpfs_mode (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -532,7 +532,7 @@ - name: mounts.source (empty for tmpfs) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -545,7 +545,7 @@ - name: mounts.source (empty for tmpfs idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: @@ -558,7 +558,7 @@ - name: mounts.source (not specified for tmpfs idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mounts: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml index 9d1a0254b9..26a822b683 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/networks.yml @@ -28,7 +28,7 @@ - name: networks docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -38,7 +38,7 @@ - name: networks (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -48,7 +48,7 @@ - name: networks (dict idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -58,7 +58,7 @@ - name: networks (change more) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -69,7 +69,7 @@ - name: networks (change more idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -80,7 +80,7 @@ - name: networks (change more dict idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -91,7 +91,7 @@ - name: networks (change more mixed idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -102,7 +102,7 @@ - name: networks (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -113,7 +113,7 @@ - name: networks (change less) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -123,7 +123,7 @@ - name: networks (change less idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -133,7 +133,7 @@ - name: networks (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: [] @@ -142,7 +142,7 @@ - name: networks (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: [] @@ -151,7 +151,7 @@ - name: networks (unknown network) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -162,7 +162,7 @@ - name: networks (missing dict key name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -173,7 +173,7 @@ - name: networks (invalid list type) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -227,7 +227,7 @@ - name: networks.aliases docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -240,7 +240,7 @@ - name: networks.aliases (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -253,7 +253,7 @@ - name: networks.aliases (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -266,7 +266,7 @@ - name: networks.aliases (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -278,7 +278,7 @@ - name: networks.aliases (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -289,7 +289,7 @@ - name: networks.aliases (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -300,7 +300,7 @@ - name: networks.aliases (invalid type) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -334,7 +334,7 @@ - name: networks.options docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -347,7 +347,7 @@ - name: networks.options (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -360,7 +360,7 @@ - name: networks.options (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -373,7 +373,7 @@ - name: networks.options (change less) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -385,7 +385,7 @@ - name: networks.options (invalid type) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -397,7 +397,7 @@ - name: networks.options (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: @@ -408,7 +408,7 @@ - name: networks.options (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' networks: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml index 020a74ae2e..df0a593894 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/options.yml @@ -15,7 +15,7 @@ - name: args docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no args: - sleep @@ -25,7 +25,7 @@ - name: args (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no args: - sleep @@ -35,7 +35,7 @@ - name: args (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no args: - sleep @@ -45,7 +45,7 @@ - name: args (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no args: [] register: args_4 @@ -53,7 +53,7 @@ - name: args (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no args: [] register: args_5 @@ -79,7 +79,7 @@ - name: command docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' register: command_1 @@ -87,7 +87,7 @@ - name: command (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' register: command_2 @@ -95,7 +95,7 @@ - name: command (less parameters) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -c "sleep 10m"' register: command_3 @@ -103,7 +103,7 @@ - name: command (as list) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: - "/bin/sh" @@ -114,7 +114,7 @@ - name: command (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: [] register: command_5 @@ -122,7 +122,7 @@ - name: command (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: [] register: command_6 @@ -130,7 +130,7 @@ - name: command (string failure) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: yes register: command_7 @@ -139,7 +139,7 @@ - name: command (list failure) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: - "/bin/sh" @@ -171,7 +171,7 @@ - name: container_labels docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' container_labels: @@ -182,7 +182,7 @@ - name: container_labels (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' container_labels: @@ -193,7 +193,7 @@ - name: container_labels (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' container_labels: @@ -204,7 +204,7 @@ - name: container_labels (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' container_labels: {} @@ -213,7 +213,7 @@ - name: container_labels (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' container_labels: {} @@ -240,7 +240,7 @@ - name: dns docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: @@ -252,7 +252,7 @@ - name: dns (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: @@ -264,7 +264,7 @@ - name: dns_servers (changed order) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: @@ -276,7 +276,7 @@ - name: dns_servers (changed elements) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: @@ -288,7 +288,7 @@ - name: dns_servers (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: [] @@ -298,7 +298,7 @@ - name: dns_servers (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns: [] @@ -333,7 +333,7 @@ - name: dns_options docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: @@ -345,7 +345,7 @@ - name: dns_options (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: @@ -357,7 +357,7 @@ - name: dns_options (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: @@ -369,7 +369,7 @@ - name: dns_options (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: @@ -381,7 +381,7 @@ - name: dns_options (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: [] @@ -391,7 +391,7 @@ - name: dns_options (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_options: [] @@ -426,7 +426,7 @@ - name: dns_search docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: @@ -438,7 +438,7 @@ - name: dns_search (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: @@ -450,7 +450,7 @@ - name: dns_search (different order) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: @@ -462,7 +462,7 @@ - name: dns_search (changed elements) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: @@ -474,7 +474,7 @@ - name: dns_search (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: [] @@ -484,7 +484,7 @@ - name: dns_search (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' dns_search: [] @@ -519,7 +519,7 @@ - name: endpoint_mode docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "dnsrr" @@ -529,7 +529,7 @@ - name: endpoint_mode (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "dnsrr" @@ -539,7 +539,7 @@ - name: endpoint_mode (changes) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' endpoint_mode: "vip" @@ -571,7 +571,7 @@ - name: env docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: @@ -582,7 +582,7 @@ - name: env (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: @@ -593,7 +593,7 @@ - name: env (changes) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: @@ -604,7 +604,7 @@ - name: env (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: @@ -615,7 +615,7 @@ - name: env (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: [] @@ -624,7 +624,7 @@ - name: env (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' env: [] @@ -633,7 +633,7 @@ - name: env (fail unwrapped values) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env: TEST1: true @@ -643,7 +643,7 @@ - name: env (fail invalid formatted string) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env: - "TEST1=val3" @@ -675,7 +675,7 @@ - name: env_files docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: - "{{ role_path }}/files/env-file-1" @@ -684,7 +684,7 @@ - name: env_files (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: - "{{ role_path }}/files/env-file-1" @@ -693,7 +693,7 @@ - name: env_files (more items) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: - "{{ role_path }}/files/env-file-1" @@ -703,7 +703,7 @@ - name: env_files (order) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: - "{{ role_path }}/files/env-file-2" @@ -713,7 +713,7 @@ - name: env_files (multiple idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: - "{{ role_path }}/files/env-file-2" @@ -723,7 +723,7 @@ - name: env_files (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: [] register: env_file_6 @@ -731,7 +731,7 @@ - name: env_files (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no env_files: [] register: env_file_7 @@ -759,7 +759,7 @@ - name: force_update docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' args: @@ -772,7 +772,7 @@ - name: force_update (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' args: @@ -806,7 +806,7 @@ - name: groups docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: @@ -818,7 +818,7 @@ - name: groups (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: @@ -830,7 +830,7 @@ - name: groups (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: @@ -842,7 +842,7 @@ - name: groups (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: @@ -853,7 +853,7 @@ - name: groups (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: [] @@ -863,7 +863,7 @@ - name: groups (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' groups: [] @@ -898,7 +898,7 @@ - name: healthcheck docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -916,7 +916,7 @@ - name: healthcheck (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -934,7 +934,7 @@ - name: healthcheck (changed) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -951,7 +951,7 @@ - name: healthcheck (disabled) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -963,7 +963,7 @@ - name: healthcheck (disabled, idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -975,7 +975,7 @@ - name: healthcheck (string in healthcheck test, changed) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -986,7 +986,7 @@ - name: healthcheck (string in healthcheck test, idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: @@ -997,7 +997,7 @@ - name: healthcheck (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: {} @@ -1007,7 +1007,7 @@ - name: healthcheck (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' healthcheck: {} @@ -1045,7 +1045,7 @@ - name: hostname docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.com @@ -1055,7 +1055,7 @@ - name: hostname (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.com @@ -1065,7 +1065,7 @@ - name: hostname (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hostname: me.example.org @@ -1097,7 +1097,7 @@ - name: hosts docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hosts: @@ -1109,7 +1109,7 @@ - name: hosts (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hosts: @@ -1121,7 +1121,7 @@ - name: hosts (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' hosts: @@ -1155,7 +1155,7 @@ - name: image docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' register: image_1 @@ -1163,7 +1163,7 @@ - name: image (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' register: image_2 @@ -1171,7 +1171,7 @@ - name: image (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.7 + image: "{{ docker_test_image_alpine_different }}" register: image_3 - name: cleanup @@ -1193,7 +1193,7 @@ - name: labels docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' labels: @@ -1204,7 +1204,7 @@ - name: labels (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' labels: @@ -1215,7 +1215,7 @@ - name: labels (changes) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' labels: @@ -1227,7 +1227,7 @@ - name: labels (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' labels: {} @@ -1236,7 +1236,7 @@ - name: labels (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' labels: {} @@ -1263,7 +1263,7 @@ - name: mode docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mode: "replicated" @@ -1273,7 +1273,7 @@ - name: mode (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mode: "replicated" @@ -1283,7 +1283,7 @@ - name: mode (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' mode: "global" @@ -1309,7 +1309,7 @@ - name: stop_grace_period docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 60s @@ -1318,7 +1318,7 @@ - name: stop_grace_period (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 60s @@ -1327,7 +1327,7 @@ - name: stop_grace_period (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_grace_period: 1m30s @@ -1352,7 +1352,7 @@ - name: stop_signal docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_signal: "30" @@ -1362,7 +1362,7 @@ - name: stop_signal (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_signal: "30" @@ -1372,7 +1372,7 @@ - name: stop_signal (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' stop_signal: "9" @@ -1404,7 +1404,7 @@ - name: publish docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1420,7 +1420,7 @@ - name: publish (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1435,7 +1435,7 @@ - name: publish (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1451,7 +1451,7 @@ - name: publish (mode) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1469,7 +1469,7 @@ - name: publish (mode idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1487,7 +1487,7 @@ - name: publish (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: [] @@ -1497,7 +1497,7 @@ - name: publish (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: [] @@ -1507,7 +1507,7 @@ - name: publish (publishes the same port with both protocols) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' publish: @@ -1557,7 +1557,7 @@ - name: read_only docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' read_only: true @@ -1567,7 +1567,7 @@ - name: read_only (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' read_only: true @@ -1577,7 +1577,7 @@ - name: read_only (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' read_only: false @@ -1609,7 +1609,7 @@ - name: replicas docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' replicas: 2 @@ -1618,7 +1618,7 @@ - name: replicas (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' replicas: 2 @@ -1627,7 +1627,7 @@ - name: replicas (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' replicas: 3 @@ -1652,7 +1652,7 @@ - name: resolve_image (false) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -v -c "sleep 10m"' resolve_image: false register: resolve_image_1 @@ -1660,7 +1660,7 @@ - name: resolve_image (false idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -v -c "sleep 10m"' resolve_image: false register: resolve_image_2 @@ -1668,7 +1668,7 @@ - name: resolve_image (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" command: '/bin/sh -v -c "sleep 10m"' resolve_image: true register: resolve_image_3 @@ -1702,7 +1702,7 @@ - name: tty docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' tty: yes @@ -1712,7 +1712,7 @@ - name: tty (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' tty: yes @@ -1722,7 +1722,7 @@ - name: tty (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' tty: no @@ -1754,7 +1754,7 @@ - name: user docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' user: "operator" @@ -1763,7 +1763,7 @@ - name: user (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' user: "operator" @@ -1772,7 +1772,7 @@ - name: user (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' user: "root" @@ -1797,7 +1797,7 @@ - name: working_dir docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no working_dir: /tmp register: working_dir_1 @@ -1805,7 +1805,7 @@ - name: working_dir (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no working_dir: /tmp register: working_dir_2 @@ -1813,7 +1813,7 @@ - name: working_dir (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no working_dir: / register: working_dir_3 @@ -1837,7 +1837,7 @@ - name: init docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no init: true register: init_1 @@ -1845,7 +1845,7 @@ - name: init (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no init: true register: init_2 @@ -1853,7 +1853,7 @@ - name: init (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no init: false register: init_3 diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml index 7d674b6bf4..e614f6a32e 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/placement.yml @@ -16,7 +16,7 @@ - name: placement.preferences docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -28,7 +28,7 @@ - name: placement.preferences (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -40,7 +40,7 @@ - name: placement.preferences (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -52,7 +52,7 @@ - name: placement.preferences (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -63,7 +63,7 @@ - name: placement.preferences (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -98,7 +98,7 @@ - name: placement.constraints docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -110,7 +110,7 @@ - name: placement.constraints (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -122,7 +122,7 @@ - name: constraints (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' constraints: @@ -133,7 +133,7 @@ - name: placement.constraints (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -145,7 +145,7 @@ - name: placement.constraints (add) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -158,7 +158,7 @@ - name: placement.constraints (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -171,7 +171,7 @@ - name: placement.constraints (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: @@ -182,7 +182,7 @@ - name: placement.constraints (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' placement: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml index 7eaba19f33..30141a24f7 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/resources.yml @@ -15,7 +15,7 @@ - name: limits.cpus docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limits: @@ -25,7 +25,7 @@ - name: limits.cpus (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limits: @@ -35,7 +35,7 @@ - name: limit_cpu (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limit_cpu: 1 @@ -44,7 +44,7 @@ - name: limits.cpus (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limits: @@ -71,7 +71,7 @@ - name: limits.memory docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limits: @@ -81,7 +81,7 @@ - name: limits.memory (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limits: @@ -91,7 +91,7 @@ - name: limit_memory (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limit_memory: "67108864" @@ -100,7 +100,7 @@ - name: limits.memory (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' limit_memory: 32M @@ -126,7 +126,7 @@ - name: reserve_cpu docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reservations: @@ -136,7 +136,7 @@ - name: reserve_cpu (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reservations: @@ -146,7 +146,7 @@ - name: reserve_cpu (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reserve_cpu: 1 @@ -155,7 +155,7 @@ - name: reserve_cpu (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reservations: @@ -182,7 +182,7 @@ - name: reservations.memory docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reservations: @@ -192,7 +192,7 @@ - name: reservations.memory (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reserve_memory: 64M @@ -201,7 +201,7 @@ - name: reserve_memory (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reserve_memory: "67108864" @@ -210,7 +210,7 @@ - name: reservations.memory (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' reserve_memory: 32M diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml index d8a415190f..18bcbb5d5f 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/restart_config.yml @@ -15,7 +15,7 @@ - name: restart_config.condition docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -25,7 +25,7 @@ - name: restart_config.condition (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -35,7 +35,7 @@ - name: restart_policy (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_policy: "on-failure" @@ -44,7 +44,7 @@ - name: restart_config.condition (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -71,7 +71,7 @@ - name: restart_config.max_attempts docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -81,7 +81,7 @@ - name: restart_config.max_attempts (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -91,7 +91,7 @@ - name: restart_policy_attempts (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_policy_attempts: 1 @@ -100,7 +100,7 @@ - name: restart_config.max_attempts (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -127,7 +127,7 @@ - name: restart_config.delay docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -137,7 +137,7 @@ - name: restart_config.delay (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -147,7 +147,7 @@ - name: restart_policy_delay (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_policy_delay: 5000000000 @@ -156,7 +156,7 @@ - name: restart_config.delay (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -183,7 +183,7 @@ - name: restart_config.window docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -193,7 +193,7 @@ - name: restart_config.window (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: @@ -203,7 +203,7 @@ - name: restart_policy_window (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_policy_window: 10000000000 @@ -212,7 +212,7 @@ - name: restart_config.window (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' restart_config: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml index 9789f450b3..8d97d7e923 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/rollback_config.yml @@ -15,7 +15,7 @@ - name: rollback_config.delay docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -26,7 +26,7 @@ - name: rollback_config.delay (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -37,7 +37,7 @@ - name: rollback_config.delay (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -70,7 +70,7 @@ - name: rollback_config.failure_action docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -81,7 +81,7 @@ - name: rollback_config.failure_action (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -92,7 +92,7 @@ - name: rollback_config.failure_action (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -125,7 +125,7 @@ - name: rollback_config.max_failure_ratio docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -136,7 +136,7 @@ - name: rollback_config.max_failure_ratio (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -147,7 +147,7 @@ - name: rollback_config.max_failure_ratio (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -180,7 +180,7 @@ - name: rollback_config.monitor docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -191,7 +191,7 @@ - name: rollback_config.monitor (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -202,7 +202,7 @@ - name: rollback_config.monitor (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -235,7 +235,7 @@ - name: rollback_config.order docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -246,7 +246,7 @@ - name: rollback_config.order (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -257,7 +257,7 @@ - name: rollback_config.order (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -290,7 +290,7 @@ - name: rollback_config.parallelism docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -301,7 +301,7 @@ - name: rollback_config.parallelism (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: @@ -312,7 +312,7 @@ - name: rollback_config.parallelism (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' rollback_config: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml index bdb903b74c..bcd1f269d1 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/secrets.yml @@ -31,7 +31,7 @@ - name: secrets docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -44,7 +44,7 @@ - name: secrets (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -56,7 +56,7 @@ - name: secrets (add) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -71,7 +71,7 @@ - name: secrets (add idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -86,7 +86,7 @@ - name: secrets (add idempotency no id) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -100,7 +100,7 @@ - name: secrets (order idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -114,7 +114,7 @@ - name: secrets (empty) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: [] @@ -124,7 +124,7 @@ - name: secrets (empty idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: [] @@ -161,7 +161,7 @@ - name: secrets (uid int) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -174,7 +174,7 @@ - name: secrets (uid int idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -187,7 +187,7 @@ - name: secrets (uid int change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -200,7 +200,7 @@ - name: secrets (uid str) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -213,7 +213,7 @@ - name: secrets (uid str idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -250,7 +250,7 @@ - name: secrets (gid int) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -263,7 +263,7 @@ - name: secrets (gid int idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -276,7 +276,7 @@ - name: secrets (gid int change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -289,7 +289,7 @@ - name: secrets (gid str) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -302,7 +302,7 @@ - name: secrets (gid str idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -339,7 +339,7 @@ - name: secrets (mode) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -352,7 +352,7 @@ - name: secrets (mode idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: @@ -365,7 +365,7 @@ - name: secrets (mode change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' secrets: diff --git a/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml b/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml index bb6e0ec1f1..4bc8a2cbef 100644 --- a/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml +++ b/tests/integration/targets/docker_swarm_service/tasks/tests/update_config.yml @@ -15,7 +15,7 @@ - name: update_config.delay docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -25,7 +25,7 @@ - name: update_config.delay (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -35,7 +35,7 @@ - name: update_delay (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_delay: 5000000000 @@ -44,7 +44,7 @@ - name: update_config.delay (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -71,7 +71,7 @@ - name: update_config.failure_action docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -81,7 +81,7 @@ - name: update_config.failure_action (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -91,7 +91,7 @@ - name: update_failure_action (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_failure_action: "pause" @@ -100,7 +100,7 @@ - name: update_config.failure_action (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -110,7 +110,7 @@ - name: update_config.failure_action (rollback) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -121,7 +121,7 @@ - name: update_config.failure_action (rollback idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_failure_action: "rollback" @@ -160,7 +160,7 @@ - name: update_config.max_failure_ratio docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -171,7 +171,7 @@ - name: update_config.max_failure_ratio (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -182,7 +182,7 @@ - name: update_max_failure_ratio (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_max_failure_ratio: 0.25 @@ -192,7 +192,7 @@ - name: update_config.max_failure_ratio (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -226,7 +226,7 @@ - name: update_config.monitor docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -237,7 +237,7 @@ - name: update_config.monitor (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -248,7 +248,7 @@ - name: update_monitor (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_monitor: 10s @@ -258,7 +258,7 @@ - name: update_config.monitor (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -292,7 +292,7 @@ - name: update_config.order docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -303,7 +303,7 @@ - name: update_config.order (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -314,7 +314,7 @@ - name: update_order (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_order: "start-first" @@ -324,7 +324,7 @@ - name: update_config.order (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -358,7 +358,7 @@ - name: update_config.parallelism docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -368,7 +368,7 @@ - name: update_config.parallelism (idempotency) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: @@ -378,7 +378,7 @@ - name: update_parallelism (idempotency, old name) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_parallelism: 2 @@ -387,7 +387,7 @@ - name: update_config.parallelism (change) docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" resolve_image: no command: '/bin/sh -v -c "sleep 10m"' update_config: diff --git a/tests/integration/targets/docker_swarm_service/vars/main.yml b/tests/integration/targets/docker_swarm_service/vars/main.yml index 1b1da299ba..8ec7ffebd5 100644 --- a/tests/integration/targets/docker_swarm_service/vars/main.yml +++ b/tests/integration/targets/docker_swarm_service/vars/main.yml @@ -17,7 +17,7 @@ service_expected_output: healthcheck_disabled: null hostname: null hosts: null - image: busybox + image: "{{ docker_test_image_busybox }}" labels: null limit_cpu: null limit_memory: null diff --git a/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml b/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml index 4da3ec066c..2b5b882ca5 100644 --- a/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml +++ b/tests/integration/targets/docker_swarm_service_info/tasks/test_docker_swarm_service_info.yml @@ -35,7 +35,7 @@ - name: Create services docker_swarm_service: name: "{{ service_name }}" - image: alpine:3.8 + image: "{{ docker_test_image_alpine }}" - name: Try to get docker_swarm_service_info for a single service docker_swarm_service_info: diff --git a/tests/integration/targets/setup_docker/vars/main.yml b/tests/integration/targets/setup_docker/vars/main.yml new file mode 100644 index 0000000000..525c42fed3 --- /dev/null +++ b/tests/integration/targets/setup_docker/vars/main.yml @@ -0,0 +1,9 @@ +--- +docker_test_image_hello_world_digest_v1: e004c2cc521c95383aebb1fb5893719aa7a8eae2e7a71f316a4410784edb00a9 +docker_test_image_hello_world_digest_v2: c9249fdf56138f0d929e2080ae98ee9cb2946f71498fc1484288e6a935b5e5bc +docker_test_image_hello_world: quay.io/app-sre/busybox +docker_test_image_busybox: quay.io/app-sre/busybox +docker_test_image_alpine: quay.io/app-sre/alpine:3.8 +docker_test_image_alpine_different: quay.io/app-sre/alpine:3.7 +docker_test_image_registry_nginx: nginx:alpine +docker_test_image_registry: registry:2.6.1 diff --git a/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml b/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml index 0de4352d75..b52a13f866 100644 --- a/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml +++ b/tests/integration/targets/setup_docker_registry/tasks/setup-frontend.yml @@ -9,7 +9,7 @@ docker_container: state: stopped name: '{{ docker_registry_container_name_frontend }}' - image: nginx:alpine + image: "{{ docker_test_image_registry_nginx }}" ports: 5000 links: - '{{ docker_registry_container_name_registry }}:real-registry' diff --git a/tests/integration/targets/setup_docker_registry/tasks/setup.yml b/tests/integration/targets/setup_docker_registry/tasks/setup.yml index c780ad45ff..9d2b52b95a 100644 --- a/tests/integration/targets/setup_docker_registry/tasks/setup.yml +++ b/tests/integration/targets/setup_docker_registry/tasks/setup.yml @@ -42,7 +42,7 @@ - name: Start test registry docker_container: name: '{{ docker_registry_container_name_registry }}' - image: registry:2.6.1 + image: "{{ docker_test_image_registry }}" ports: 5000 register: registry_container diff --git a/tests/integration/targets/setup_docker_registry/vars/main.yml b/tests/integration/targets/setup_docker_registry/vars/main.yml new file mode 120000 index 0000000000..bacffb8376 --- /dev/null +++ b/tests/integration/targets/setup_docker_registry/vars/main.yml @@ -0,0 +1 @@ +../../setup_docker/vars/main.yml \ No newline at end of file