1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00
ansible-podman-collections/tests/integration/targets/podman_container_idempotency/tasks/idem_pods.yml
Sergey 03f19dfe25
Prepare tests to use custom executable, part 5 (#477)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 22:03:29 +03:00

83 lines
2 KiB
YAML

- name: Remove testing pod
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: testpod
state: absent
- name: Remove test container
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
name: testpod_container1
state: absent
- name: Create pod
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: testpod
publish:
- "11111:11111"
- name: Start test container
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
image: "{{ idem_image }}"
name: testpod_container1
pod: testpod
state: started
label:
key: value
env:
test: test2
volumes:
- /tmp:/data
- name: Start test container again
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
image: "{{ idem_image }}"
name: testpod_container1
pod: testpod
state: started
label:
key: value
env:
test: test2
volumes:
- /tmp:/data
register: info
- name: Check starting container
assert:
that: info is not changed
- name: Start test container changed
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
image: "{{ idem_image }}"
name: testpod_container1
pod: testpod
state: started
register: info1
- name: Check starting container changed
assert:
that: info1 is changed
- name: Start test container again
containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
image: "{{ idem_image }}"
name: testpod_container1
pod: testpod
state: started
register: info2
- name: Check starting container again
assert:
that: info2 is not changed
- name: Remove testing pod
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: testpod
state: absent