docker_container: fix tests and idempotency for init and shm_size (#48551)

* Fix tests: use same command if not testing command option.

* Fix idempotency of init option.

* Fix shm_size idempotency (it is included in inspect results from docker API version 1.22 on).

* Add changelog.

(cherry picked from commit b1acabcd03)
This commit is contained in:
Felix Fontein 2018-11-13 14:07:36 +01:00 committed by Toshio Kuratomi
parent 476673f3e4
commit ce9f2e6147
3 changed files with 73 additions and 71 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - ``init`` and ``shm_size`` are now checked for idempotency."

View file

@ -1345,6 +1345,7 @@ class Container(DockerBaseClass):
hostname=config.get('Hostname'), hostname=config.get('Hostname'),
user=config.get('User'), user=config.get('User'),
detach=detach, detach=detach,
init=host_config.get('Init'),
interactive=config.get('OpenStdin'), interactive=config.get('OpenStdin'),
capabilities=host_config.get('CapAdd'), capabilities=host_config.get('CapAdd'),
cap_drop=host_config.get('CapDrop'), cap_drop=host_config.get('CapDrop'),
@ -1371,8 +1372,7 @@ class Container(DockerBaseClass):
expected_ports=host_config.get('PortBindings'), expected_ports=host_config.get('PortBindings'),
read_only=host_config.get('ReadonlyRootfs'), read_only=host_config.get('ReadonlyRootfs'),
restart_policy=restart_policy.get('Name'), restart_policy=restart_policy.get('Name'),
# Cannot test shm_size, as shm_size is not included in container inspection results. shm_size=host_config.get('ShmSize'),
# shm_size=host_config.get('ShmSize'),
security_opts=host_config.get("SecurityOpt"), security_opts=host_config.get("SecurityOpt"),
stop_signal=config.get("StopSignal"), stop_signal=config.get("StopSignal"),
tmpfs=host_config.get('Tmpfs'), tmpfs=host_config.get('Tmpfs'),

View file

@ -216,7 +216,7 @@
- name: cpu_period - name: cpu_period
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_period: 90000 cpu_period: 90000
state: started state: started
@ -225,7 +225,7 @@
- name: cpu_period (idempotency) - name: cpu_period (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_period: 90000 cpu_period: 90000
state: started state: started
@ -260,7 +260,7 @@
- name: cpu_quota - name: cpu_quota
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_quota: 150000 cpu_quota: 150000
state: started state: started
@ -269,7 +269,7 @@
- name: cpu_quota (idempotency) - name: cpu_quota (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_quota: 150000 cpu_quota: 150000
state: started state: started
@ -304,7 +304,7 @@
- name: cpu_shares - name: cpu_shares
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_shares: 900 cpu_shares: 900
state: started state: started
@ -313,7 +313,7 @@
- name: cpu_shares (idempotency) - name: cpu_shares (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpu_shares: 900 cpu_shares: 900
state: started state: started
@ -348,7 +348,7 @@
- name: cpuset_cpus - name: cpuset_cpus
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpuset_cpus: 0 cpuset_cpus: 0
state: started state: started
@ -357,7 +357,7 @@
- name: cpuset_cpus (idempotency) - name: cpuset_cpus (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpuset_cpus: 0 cpuset_cpus: 0
state: started state: started
@ -395,7 +395,7 @@
- name: cpuset_mems - name: cpuset_mems
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpuset_mems: 0 cpuset_mems: 0
state: started state: started
@ -404,7 +404,7 @@
- name: cpuset_mems (idempotency) - name: cpuset_mems (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
cpuset_mems: 0 cpuset_mems: 0
state: started state: started
@ -807,7 +807,7 @@
- name: domainname - name: domainname
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
domainname: example.com domainname: example.com
state: started state: started
@ -816,7 +816,7 @@
- name: domainname (idempotency) - name: domainname (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
domainname: example.com domainname: example.com
state: started state: started
@ -1212,7 +1212,7 @@
- name: hostname - name: hostname
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
hostname: me.example.com hostname: me.example.com
state: started state: started
@ -1221,7 +1221,7 @@
- name: hostname (idempotency) - name: hostname (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
hostname: me.example.com hostname: me.example.com
state: started state: started
@ -1256,7 +1256,7 @@
- name: init - name: init
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
init: yes init: yes
state: started state: started
@ -1266,7 +1266,7 @@
- name: init (idempotency) - name: init (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
init: yes init: yes
state: started state: started
@ -1309,7 +1309,7 @@
- name: interactive - name: interactive
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
interactive: yes interactive: yes
state: started state: started
@ -1318,7 +1318,7 @@
- name: interactive (idempotency) - name: interactive (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
interactive: yes interactive: yes
state: started state: started
@ -1408,7 +1408,7 @@
- name: start helpers - name: start helpers
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ container_name }}" name: "{{ container_name }}"
state: started state: started
loop: loop:
@ -1470,7 +1470,7 @@
- name: kernel_memory - name: kernel_memory
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
kernel_memory: 8M kernel_memory: 8M
state: started state: started
@ -1479,7 +1479,7 @@
- name: kernel_memory (idempotency) - name: kernel_memory (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
kernel_memory: 8M kernel_memory: 8M
state: started state: started
@ -1581,7 +1581,7 @@
- name: start helpers - name: start helpers
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ container_name }}" name: "{{ container_name }}"
state: started state: started
loop: loop:
@ -1771,7 +1771,7 @@
- name: mac_address - name: mac_address
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
mac_address: 92:d0:c6:0a:29:33 mac_address: 92:d0:c6:0a:29:33
state: started state: started
@ -1780,7 +1780,7 @@
- name: mac_address (idempotency) - name: mac_address (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
mac_address: 92:d0:c6:0a:29:33 mac_address: 92:d0:c6:0a:29:33
state: started state: started
@ -1815,7 +1815,7 @@
- name: memory - name: memory
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory: 64M memory: 64M
state: started state: started
@ -1824,7 +1824,7 @@
- name: memory (idempotency) - name: memory (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory: 64M memory: 64M
state: started state: started
@ -1859,7 +1859,7 @@
- name: memory_reservation - name: memory_reservation
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory_reservation: 64M memory_reservation: 64M
state: started state: started
@ -1868,7 +1868,7 @@
- name: memory_reservation (idempotency) - name: memory_reservation (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory_reservation: 64M memory_reservation: 64M
state: started state: started
@ -1903,7 +1903,7 @@
- name: memory_swap - name: memory_swap
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
# Docker daemon does not accept memory_swap if memory is not specified # Docker daemon does not accept memory_swap if memory is not specified
memory: 32M memory: 32M
@ -1915,7 +1915,7 @@
- name: memory_swap (idempotency) - name: memory_swap (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
# Docker daemon does not accept memory_swap if memory is not specified # Docker daemon does not accept memory_swap if memory is not specified
memory: 32M memory: 32M
@ -1965,7 +1965,7 @@
- name: memory_swappiness - name: memory_swappiness
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory_swappiness: 40 memory_swappiness: 40
state: started state: started
@ -1974,7 +1974,7 @@
- name: memory_swappiness (idempotency) - name: memory_swappiness (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
memory_swappiness: 40 memory_swappiness: 40
state: started state: started
@ -2132,7 +2132,7 @@
- name: oom_killer - name: oom_killer
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
oom_killer: yes oom_killer: yes
state: started state: started
@ -2142,7 +2142,7 @@
- name: oom_killer (idempotency) - name: oom_killer (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
oom_killer: yes oom_killer: yes
state: started state: started
@ -2185,7 +2185,7 @@
- name: oom_score_adj - name: oom_score_adj
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
oom_score_adj: 5 oom_score_adj: 5
state: started state: started
@ -2195,7 +2195,7 @@
- name: oom_score_adj (idempotency) - name: oom_score_adj (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
oom_score_adj: 5 oom_score_adj: 5
state: started state: started
@ -2268,7 +2268,7 @@
- name: paused (continue) - name: paused (continue)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: "/bin/sh -c 'sleep 1s ; yes'" command: "/bin/sh -c 'sleep 10m'"
name: "{{ cname }}" name: "{{ cname }}"
state: started state: started
paused: no paused: no
@ -2300,7 +2300,7 @@
- name: start helpers - name: start helpers
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname_h1 }}" name: "{{ cname_h1 }}"
state: started state: started
register: pid_mode_helper register: pid_mode_helper
@ -2368,7 +2368,7 @@
- name: privileged - name: privileged
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
privileged: yes privileged: yes
state: started state: started
@ -2377,7 +2377,7 @@
- name: privileged (idempotency) - name: privileged (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
privileged: yes privileged: yes
state: started state: started
@ -2479,7 +2479,7 @@
- name: read_only - name: read_only
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
read_only: yes read_only: yes
state: started state: started
@ -2488,7 +2488,7 @@
- name: read_only (idempotency) - name: read_only (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
read_only: yes read_only: yes
state: started state: started
@ -2523,7 +2523,7 @@
- name: recreate (created) - name: recreate (created)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
state: present state: present
stop_timeout: 1 stop_timeout: 1
@ -2532,7 +2532,7 @@
- name: recreate (created, recreate) - name: recreate (created, recreate)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
recreate: yes recreate: yes
state: present state: present
@ -2542,7 +2542,7 @@
- name: recreate (started) - name: recreate (started)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
state: started state: started
stop_timeout: 1 stop_timeout: 1
@ -2551,7 +2551,7 @@
- name: recreate (started, recreate) - name: recreate (started, recreate)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
recreate: yes recreate: yes
state: started state: started
@ -2586,7 +2586,7 @@
- name: restart - name: restart
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
state: started state: started
stop_timeout: 1 stop_timeout: 1
@ -2595,7 +2595,7 @@
- name: restart (restart) - name: restart (restart)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
restart: yes restart: yes
state: started state: started
@ -2624,7 +2624,7 @@
- name: restart_policy - name: restart_policy
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
restart_policy: always restart_policy: always
state: started state: started
@ -2633,7 +2633,7 @@
- name: restart_policy (idempotency) - name: restart_policy (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
restart_policy: always restart_policy: always
state: started state: started
@ -2668,7 +2668,7 @@
- name: restart_retries - name: restart_retries
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
restart_policy: on-failure restart_policy: on-failure
restart_retries: 5 restart_retries: 5
@ -2678,7 +2678,7 @@
- name: restart_retries (idempotency) - name: restart_retries (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
restart_policy: on-failure restart_policy: on-failure
restart_retries: 5 restart_retries: 5
@ -2792,7 +2792,7 @@
- name: shm_size - name: shm_size
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
shm_size: 96M shm_size: 96M
state: started state: started
@ -2801,7 +2801,7 @@
- name: shm_size (idempotency) - name: shm_size (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
shm_size: 96M shm_size: 96M
state: started state: started
@ -2836,7 +2836,7 @@
- name: stop_signal - name: stop_signal
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
stop_signal: 30 stop_signal: 30
state: started state: started
@ -2845,7 +2845,7 @@
- name: stop_signal (idempotency) - name: stop_signal (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
stop_signal: 30 stop_signal: 30
state: started state: started
@ -3034,7 +3034,7 @@
- name: tty - name: tty
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
tty: yes tty: yes
state: started state: started
@ -3043,7 +3043,7 @@
- name: tty (idempotency) - name: tty (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
tty: yes tty: yes
state: started state: started
@ -3139,7 +3139,7 @@
- name: user - name: user
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
user: nobody user: nobody
state: started state: started
@ -3148,7 +3148,7 @@
- name: user (idempotency) - name: user (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
user: nobody user: nobody
state: started state: started
@ -3183,7 +3183,7 @@
- name: userns_mode - name: userns_mode
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
userns_mode: host userns_mode: host
state: started state: started
@ -3193,7 +3193,7 @@
- name: userns_mode (idempotency) - name: userns_mode (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
userns_mode: host userns_mode: host
state: started state: started
@ -3236,7 +3236,7 @@
- name: uts - name: uts
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
uts: host uts: host
state: started state: started
@ -3246,7 +3246,7 @@
- name: uts (idempotency) - name: uts (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
uts: host uts: host
state: started state: started
@ -3295,7 +3295,7 @@
- name: volume_driver - name: volume_driver
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
volume_driver: local volume_driver: local
state: started state: started
@ -3304,7 +3304,7 @@
- name: volume_driver (idempotency) - name: volume_driver (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
volume_driver: local volume_driver: local
state: started state: started
@ -3400,7 +3400,7 @@
- name: start helpers - name: start helpers
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ container_name }}" name: "{{ container_name }}"
state: started state: started
volumes: volumes:
@ -3464,7 +3464,7 @@
- name: working_dir - name: working_dir
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
working_dir: /tmp working_dir: /tmp
state: started state: started
@ -3473,7 +3473,7 @@
- name: working_dir (idempotency) - name: working_dir (idempotency)
docker_container: docker_container:
image: alpine:3.8 image: alpine:3.8
command: '/bin/sh -v -c "sleep 10m"' command: '/bin/sh -c "sleep 10m"'
name: "{{ cname }}" name: "{{ cname }}"
working_dir: /tmp working_dir: /tmp
state: started state: started