mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
docker_container: fix idempotency problem with empty published_ports list (#979)
* Distinguish between [] and None. * Add changelog fragment. * Fix typo.
This commit is contained in:
@@ -2873,6 +2873,18 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
force_kill: yes
|
||||
register: published_ports_5
|
||||
|
||||
- name: published_ports (no published ports)
|
||||
docker_container:
|
||||
image: alpine:3.8
|
||||
command: '/bin/sh -c "sleep 10m"'
|
||||
name: "{{ cname }}"
|
||||
state: started
|
||||
published_ports: []
|
||||
comparisons:
|
||||
published_ports: strict
|
||||
force_kill: yes
|
||||
register: published_ports_6
|
||||
|
||||
- name: cleanup
|
||||
docker_container:
|
||||
name: "{{ cname }}"
|
||||
@@ -2887,6 +2899,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
- published_ports_3 is not changed
|
||||
- published_ports_4 is changed
|
||||
- published_ports_5 is changed
|
||||
- published_ports_6 is changed
|
||||
|
||||
####################################################################
|
||||
## pull ############################################################
|
||||
|
||||
Reference in New Issue
Block a user