Update podman role

This commit is contained in:
Daniel Akulenok
2025-09-09 12:35:00 +02:00
parent ad681951fd
commit 50fdc3689b
9 changed files with 96 additions and 78 deletions

View File

@@ -10,3 +10,31 @@
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
- name: Start Podman pods
ansible.builtin.systemd:
name: "{{ podman_systemd_options.pod_prefix }}{{ item.name }}"
enabled: true
state: started
daemon_reload: true
listen: Reload systemd
loop: "{{ podman_pods }}"
loop_control:
label: "{{ item.name }}"
when:
- podman_pods is defined
- podman_pods | length > 0
- name: Start Podman podless containers
ansible.builtin.systemd:
name: "{{ podman_systemd_options.container_prefix }}{{ item.name }}"
enabled: true
state: started
daemon_reload: true
listen: Reload systemd
loop: "{{ podman_containers | rejectattr('pod', 'defined') | list }}"
loop_control:
label: "{{ item.name }}"
when:
- podman_containers is defined
- podman_containers | length > 0