This commit is contained in:
Daniel Akulenok
2026-02-18 12:34:10 +01:00
parent 034cc628ce
commit 19502bf14a
4 changed files with 22 additions and 9 deletions

View File

@@ -16,7 +16,8 @@
name: "{{ item }}-network"
state: restarted
listen: Reload systemd
loop: "{{ podman_network_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}"
loop: |
{{ podman_network_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}
loop_control:
label: "{{ item }}"
when:
@@ -29,7 +30,8 @@
name: "{{ item }}-volume"
state: restarted
listen: Reload systemd
loop: "{{ podman_volume_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}"
loop: |
{{ podman_volume_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}
loop_control:
label: "{{ item }}"
when:
@@ -39,10 +41,13 @@
- name: Restart Podman pods
ansible.builtin.systemd:
name: "{{ (podman_systemd_options.pod_prefix if podman_generate_systemd | bool else '') ~ item ~ ('-pod' if not podman_generate_systemd | bool else '') }}"
name: |
{{ (podman_systemd_options.pod_prefix if podman_generate_systemd | bool else '')
~ item ~ ('-pod' if not podman_generate_systemd | bool else '') }}
state: restarted
listen: Reload systemd
loop: "{{ podman_pod_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}"
loop: |
{{ podman_pod_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}
loop_control:
label: "{{ item }}"
when:
@@ -51,10 +56,12 @@
- name: Restart Podman containers
ansible.builtin.systemd:
name: "{{ (podman_systemd_options.container_prefix if podman_generate_systemd | bool else '') ~ item }}"
name: |
{{ (podman_systemd_options.container_prefix if podman_generate_systemd | bool else '') ~ item }}
state: restarted
listen: Reload systemd
loop: "{{ podman_container_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}"
loop: |
{{ podman_container_output.results | selectattr('changed', 'equalto', true) | map(attribute='item.name') | list }}
loop_control:
label: "{{ item }}"
when: