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/main.yml
Sergey 91d991f95b
Add building Podman from source (#955)
* Add building Podman from source

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-03 13:30:27 +03:00

72 lines
1.7 KiB
YAML

---
- name: Discover podman version
shell: podman version | grep "^Version:" | awk {'print $2'}
register: podman_v
- name: Set podman version to 3
set_fact:
podman_version: 3
when: podman_v.stdout is version('4.0.0', 'lt')
- name: Set podman version to 4
set_fact:
podman_version: 4
when: podman_v.stdout is version('4.0.0', '>=')
- name: Set podman version to 5
set_fact:
podman_version: 5
when: podman_v.stdout is version('5.0.0', '>=')
- name: Prepare a container
include_tasks: build_test_container.yml
- name: Test idempotency of users
include_tasks: idem_users.yml
- name: Test idempotency of workdir
include_tasks: idem_workdir.yml
- name: Test idempotency of labels
include_tasks: idem_labels.yml
- name: Test idempotency of stop signal
include_tasks: idem_stopsignal.yml
- name: Test idempotency of ports
include_tasks: idem_ports.yml
tags:
- no_build_version
- name: Test idempotency of volumes
include_tasks: idem_volumes.yml
- name: Test idempotency of containers in pods
include_tasks: idem_pods.yml
- name: Test idempotency of systemd generation
include_tasks: idem_systemd.yml
when: podman_version | int > 3
- name: Test idempotency of other settings
include_tasks: idem_all.yml
- name: Test idempotency for root containers
include_tasks: root-podman.yml
vars:
ansible_python_interpreter: "/usr/bin/python"
args:
apply:
become: true
- name: Test idempotency for root network containers
include_tasks: root-podman-network.yml
vars:
ansible_python_interpreter: "/usr/bin/python"
args:
apply:
become: true
- name: Test idempotency for rootless network containers
include_tasks: rootless-podman-network.yml