From cd6ed344ebb40804e70447bf554a83315c75f077 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 15 Jan 2023 17:00:59 +0000 Subject: [PATCH] Reload if changed --- roles/debian/tasks/systemd.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/debian/tasks/systemd.yml b/roles/debian/tasks/systemd.yml index fd38d6b..16ee2a0 100644 --- a/roles/debian/tasks/systemd.yml +++ b/roles/debian/tasks/systemd.yml @@ -24,6 +24,7 @@ ansible.builtin.copy: src: DefaultTimeoutStopSec.conf dest: "/etc/systemd/system.conf.d/DefaultTimeoutStopSec.conf" + register: system_conf_d - name: Create /etc/systemd/user.conf.d become: true ansible.builtin.file: @@ -35,3 +36,9 @@ ansible.builtin.copy: src: DefaultTimeoutStopSec.conf dest: "/etc/systemd/user.conf.d/DefaultTimeoutStopSec.conf" + register: user_conf_d +- name: Reload systemd + become: true + ansible.builtin.systemd: + daemon_reload: true + when: system_conf_d.changed == true or user_conf_d.changed == true