1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Idempotency improvements (#795)

* Fix integers in Quadlet generation
* Work around quotes in command for idempotency

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2024-07-07 22:55:26 +03:00 committed by GitHub
parent 9775178872
commit d25cf57967
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 95 additions and 3 deletions

View file

@ -420,6 +420,69 @@
assert:
that: test29 is changed
- name: Run container with complex command
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
name: idempotency2
image: alpine
command:
- sh
- -c
- read
- -p
- 8012
interactive: true
tty: true
device:
- /dev/fuse
register: test30
- name: Run container with complex command again
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
name: idempotency2
image: alpine
command:
- sh
- -c
- read
- -p
- 8012
interactive: true
tty: true
device:
- /dev/fuse
register: test31
- name: Run container with different complex command
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
name: idempotency2
image: alpine
command:
- sh
- -c
- read
- -p
- 8015
interactive: true
tty: true
device:
- /dev/fuse
register: test32
- name: Check info of container with complex command
assert:
that: test30 is changed
- name: Check info of container with complex command again
assert:
that: test31 is not changed
- name: Check info of container with complex command
assert:
that: test32 is changed
- name: Remove dependent test container
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"