podman
This commit is contained in:
@@ -166,14 +166,27 @@ podman_policy_trusted_registries:
|
||||
podman_enable_socket: false
|
||||
podman_enable_api_service: false
|
||||
|
||||
# Determine if Quadlet should be used (Debian 13+ or other distros)
|
||||
podman_use_quadlet: "{{ not (ansible_distribution | default('Debian') == 'Debian' and ansible_distribution_major_version | default('13') | int < 13) }}"
|
||||
podman_mode: "{{ 'quadlet' if podman_use_quadlet else 'started' }}"
|
||||
|
||||
# Container management
|
||||
podman_container_defaults:
|
||||
state: "{{ podman_mode }}"
|
||||
pull: newer
|
||||
quadlet_options:
|
||||
- "AutoUpdate=registry"
|
||||
- "Pull=newer"
|
||||
- |
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
podman_containers: []
|
||||
# Example container configurations:
|
||||
# podman_containers:
|
||||
# # Basic web server container
|
||||
# - name: nginx
|
||||
# image: docker.io/nginx:latest
|
||||
# state: started
|
||||
# ports:
|
||||
# - "8080:80"
|
||||
# volumes:
|
||||
@@ -192,7 +205,6 @@ podman_containers: []
|
||||
# # Advanced container with comprehensive configuration
|
||||
# - name: app-server
|
||||
# image: registry.example.com/myapp:v1.2.3
|
||||
# state: started
|
||||
# # Basic runtime options
|
||||
# command: ["/app/start.sh", "--config", "/etc/app/config.yaml"]
|
||||
# entrypoint: "/entrypoint.sh"
|
||||
@@ -473,6 +485,13 @@ podman_containers: []
|
||||
# - "no-new-privileges=true"
|
||||
|
||||
# Network management
|
||||
podman_network_defaults:
|
||||
state: "{{ 'quadlet' if podman_use_quadlet else 'present' }}"
|
||||
quadlet_options:
|
||||
- |
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
podman_networks: []
|
||||
# Example network configuration:
|
||||
# podman_networks:
|
||||
@@ -480,7 +499,6 @@ podman_networks: []
|
||||
# driver: bridge
|
||||
# subnet: "10.89.0.0/24"
|
||||
# gateway: "10.89.0.1"
|
||||
# state: present
|
||||
# - name: frontend-network
|
||||
# driver: bridge
|
||||
# subnet: "172.20.0.0/16"
|
||||
@@ -508,14 +526,20 @@ podman_networks: []
|
||||
# - "10.10.0.0/16,192.168.1.1"
|
||||
|
||||
# Volume management
|
||||
podman_create_volumes: true
|
||||
podman_volume_defaults:
|
||||
state: "{{ 'quadlet' if podman_use_quadlet else 'present' }}"
|
||||
quadlet_options:
|
||||
- |
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
podman_volumes: []
|
||||
# Example volume configuration:
|
||||
# podman_volumes:
|
||||
# - name: app-data
|
||||
# state: present
|
||||
# driver: local
|
||||
# - name: database-volume
|
||||
# state: present
|
||||
# driver: local
|
||||
# labels:
|
||||
# environment: production
|
||||
@@ -525,7 +549,6 @@ podman_volumes: []
|
||||
# - "type=ext4"
|
||||
# - "o=rw"
|
||||
# - name: tmpfs-volume
|
||||
# state: present
|
||||
# driver: tmpfs
|
||||
# options:
|
||||
# - "tmpfs-size=100m"
|
||||
@@ -542,11 +565,17 @@ podman_volumes: []
|
||||
# debug: false
|
||||
|
||||
# Pod management
|
||||
podman_pod_defaults:
|
||||
state: "{{ podman_mode }}"
|
||||
quadlet_options:
|
||||
- |
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
podman_pods: []
|
||||
# Example pod configuration:
|
||||
# podman_pods:
|
||||
# - name: webapp-pod
|
||||
# state: started
|
||||
# ports:
|
||||
# - "8080:80"
|
||||
# - "3306:3306"
|
||||
@@ -576,7 +605,6 @@ podman_pods: []
|
||||
# share: "net,ipc"
|
||||
# userns: "auto"
|
||||
# - name: monitoring-pod
|
||||
# state: started
|
||||
# ports:
|
||||
# - "9090:9090"
|
||||
# device:
|
||||
@@ -614,7 +642,7 @@ podman_pods: []
|
||||
|
||||
podman_auto_remove: true
|
||||
# Systemd service generation configuration
|
||||
podman_generate_systemd: true
|
||||
podman_generate_systemd: "{{ not podman_use_quadlet }}"
|
||||
podman_systemd_dir: /etc/systemd/system
|
||||
podman_systemd_options:
|
||||
new: true
|
||||
|
||||
Reference in New Issue
Block a user