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_play/tasks/play-multi-yaml.yml
Sagi Shnaidman 453be5c5fd Add check and fixed for v5 network diff
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:11:46 +03:00

40 lines
1.1 KiB
YAML

---
- name: Test kube play wih multi doc yaml
block:
- name: Copy kube file
copy:
src: "{{ kube_file }}"
dest: "{{ kube_dir }}/{{ kube_file }}"
remote_src: false
- name: Create Pod with multi doc yaml
containers.podman.podman_play:
executable: "{{ test_executable | default('podman') }}"
kube_file: "{{ kube_dir }}/{{ kube_file }}"
state: started
recreate: true
register: play_pod
- name: Get pod info
containers.podman.podman_container_info:
executable: "{{ test_executable | default('podman') }}"
name: "{{ target_container }}"
register: info
- name: Check if an expected container is running
assert:
that:
- info.containers.0.State.Running == true
- '"FOO=bar" in info.containers.0.Config.Env'
- name: Cleanup pod
containers.podman.podman_play:
executable: "{{ test_executable | default('podman') }}"
kube_file: "{{ kube_dir }}/{{ kube_file }}"
state: absent
register: remove_pod
- name: Check if the pod was removed as expected
assert:
that:
- remove_pod is changed