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_pod/tasks/net-pod.yml
Sergey a9fc6b9764
Fix CI jobs for podman_pod with network force (#662)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-01 11:31:00 +02:00

80 lines
2.1 KiB
YAML

- name: Test podman rootful pod
block:
- name: Remove pods
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: "rootnetpod"
state: absent
- name: Delete all network leftovers from tests
containers.podman.podman_network:
executable: "{{ test_executable | default('podman') }}"
name: "{{ item }}"
state: absent
force: true
loop:
- testnet
- anothernet
- name: Create network testnet
command: podman network create testnet --subnet 10.91.91.0/24
- name: Create network anothernet
command: podman network create anothernet --subnet 10.71.71.0/24
- name: List current networks
command: podman network ls
- name: Set test data
set_fact:
testdata:
- first_net: host
next_net: bridge
- first_net: bridge
next_net: host
- first_net: anothernet
next_net: testnet
- first_net: testnet
next_net:
- testnet
- anothernet
- first_net:
- testnet
- anothernet
next_net: anothernet
- first_net:
- testnet
- anothernet
next_net: bridge
- first_net:
- testnet
- anothernet
next_net: host
- first_net: host
next_net: anothernet
- first_net: bridge
next_net:
- anothernet
- testnet
- include_tasks: network-tests.yml
loop: "{{ testdata }}"
always:
- name: Delete all pods leftovers from tests
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: "rootnetpod"
state: absent
- name: Delete all network leftovers from tests
containers.podman.podman_network:
executable: "{{ test_executable | default('podman') }}"
name: "{{ item }}"
state: absent
force: true
loop:
- testnet
- anothernet