mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Fix idempotency for empty values (#790)
Fix #788 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
parent
f9aa8878fd
commit
24c842fdd6
2 changed files with 42 additions and 0 deletions
|
|
@ -26,6 +26,44 @@
|
|||
assert:
|
||||
that: test1 is not changed
|
||||
|
||||
- name: Run container with empty vars for list and dict
|
||||
containers.podman.podman_container:
|
||||
executable: "{{ test_executable | default('podman') }}"
|
||||
image: "{{ idem_image }}"
|
||||
name: idempotency
|
||||
state: present
|
||||
env: {}
|
||||
publish: []
|
||||
command: 1h
|
||||
register: test_to_empty
|
||||
|
||||
- name: Run container with empty vars for list and dict - again
|
||||
containers.podman.podman_container:
|
||||
executable: "{{ test_executable | default('podman') }}"
|
||||
image: "{{ idem_image }}"
|
||||
name: idempotency
|
||||
state: present
|
||||
env: {}
|
||||
publish: []
|
||||
command: 1h
|
||||
register: test_empty
|
||||
|
||||
- name: Run container again w/o empty vars
|
||||
containers.podman.podman_container:
|
||||
executable: "{{ test_executable | default('podman') }}"
|
||||
image: "{{ idem_image }}"
|
||||
name: idempotency
|
||||
state: present
|
||||
command: 1h
|
||||
register: test_from_empty
|
||||
|
||||
- name: Check info when running container again
|
||||
assert:
|
||||
that:
|
||||
- test_to_empty is not changed
|
||||
- test_empty is not changed
|
||||
- test_from_empty is not changed
|
||||
|
||||
- name: Run container with environment vars
|
||||
containers.podman.podman_container:
|
||||
executable: "{{ test_executable | default('podman') }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue