diff --git a/handlers/main.yml b/handlers/main.yml index 05778e4..82fe4a2 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -30,3 +30,14 @@ state: restarted name: rsyslog.service become: true + +- name: Redémarrer le conteneur + ansible.builtin.systemd: + name: "{{ item.name }}" + state: restarted + scope: true + daemon_reload: true + become: true + loop: "{{ podman_containers }}" + loop_control: + label: "{{ item.name }}" diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 71571c8..29b2374 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -34,3 +34,4 @@ label: "{{ item.name }}" vars: container_user: "podman-{{ item.user | default(item.name) }}" + notify: Redémarrer le conteneur