From 1da27ec5a234bf7ddee6dd1129433692b21cbeed Mon Sep 17 00:00:00 2001 From: "pulsar89.5" Date: Sun, 9 Jun 2024 13:19:09 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Red=C3=A9marrer=20le=20conteneur=20apr?= =?UTF-8?q?=C3=A8s=20son=20d=C3=A9ploiement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/main.yml | 11 +++++++++++ tasks/configuration.yml | 1 + 2 files changed, 12 insertions(+) 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