1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[stable-1] Fix docker tests (#1398)

* Adjust version_added, re-place tests. (#34)

* Template docker test containers.

* Forgot to adjust test.
This commit is contained in:
Felix Fontein 2020-11-26 13:21:12 +01:00 committed by GitHub
parent ab94b0ace0
commit e03431d9f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 823 additions and 801 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,3 +0,0 @@
FROM busybox
ENV foo /bar
WORKDIR ${foo}

View file

@ -1,7 +0,0 @@
FROM busybox AS first
ENV dir /first
WORKDIR ${dir}
FROM busybox AS second
ENV dir /second
WORKDIR ${dir}

View file

@ -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:

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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:

View file

@ -0,0 +1,3 @@
FROM {{ docker_test_image_busybox }}
ENV foo /bar
WORKDIR ${foo}

View file

@ -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

View file

@ -1,4 +1,4 @@
FROM alpine:3.7
FROM {{ docker_test_image_alpine }}
ENV INSTALL_PATH /newdata
RUN mkdir -p $INSTALL_PATH

View file

@ -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}

View file

@ -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', '>=')

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -1,5 +1,5 @@
version: '3'
services:
busybox:
image: busybox:latest
image: "{{ docker_test_image_busybox }}:latest"
command: sleep 3600

View file

@ -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:

View file

@ -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:

View file

@ -1,5 +1,5 @@
version: '3'
services:
busybox:
image: busybox:latest
image: "{{ docker_test_image_busybox }}:latest"
command: sleep 3600

View file

@ -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:

View file

@ -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:

View file

@ -1,5 +1,5 @@
version: '3'
services:
busybox:
image: busybox:latest
image: "{{ docker_test_image_busybox }}:latest"
command: sleep 3600

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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'

View file

@ -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

View file

@ -0,0 +1 @@
../../setup_docker/vars/main.yml