1
0
Fork 0
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:
Sergey 2024-06-20 09:53:16 +03:00 committed by GitHub
parent f9aa8878fd
commit 24c842fdd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 0 deletions

View file

@ -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') }}"