Enhance Podman configuration and management
- Update pruning options to include filters for containers, images, networks, and volumes. - Modify handlers to restart Podman resources based on new conditions. - Expand Molecule tests to verify networks, volumes, pods, and containers. - Adjust service management tasks for Podman services and auto-update. - Refactor tasks for better clarity and maintainability.
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
pre_tasks:
|
||||
- name: Install curl for verification
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
name: curl
|
||||
state: present
|
||||
vars:
|
||||
podman_networks:
|
||||
- name: test_network
|
||||
driver: bridge
|
||||
- name: test_network_custom
|
||||
driver: bridge
|
||||
|
||||
podman_volumes:
|
||||
- name: test_volume
|
||||
driver: local
|
||||
- name: test_volume_2
|
||||
driver: local
|
||||
|
||||
podman_pods:
|
||||
- name: test_pod
|
||||
hostname: test-pod
|
||||
publish: "8090:8080"
|
||||
|
||||
podman_containers:
|
||||
- name: test_container
|
||||
image: docker.io/nginx:latest
|
||||
@@ -15,5 +26,24 @@
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
networks:
|
||||
- test_network
|
||||
|
||||
- name: pod_container
|
||||
image: docker.io/nginx:latest
|
||||
systemd: true
|
||||
pod: test_pod
|
||||
networks:
|
||||
- test_network_custom
|
||||
|
||||
- name: volume_test_container
|
||||
image: docker.io/alpine:latest
|
||||
systemd: false
|
||||
volumes:
|
||||
- test_volume:/data
|
||||
networks:
|
||||
- test_network
|
||||
command: sleep 3600
|
||||
|
||||
roles:
|
||||
- ansible-podman
|
||||
|
||||
Reference in New Issue
Block a user