From 682d293d45df3a731e5fa8d80c4fcb3e35533066 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 16 Oct 2018 00:23:42 +0200 Subject: [PATCH] reload systemd after change --- tasks/install.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/install.yml b/tasks/install.yml index 9101980..06df14d 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -14,12 +14,18 @@ state: directory mode: 0700 - - name: Setup custom systemd unit + - name: Setup custom systemd service template: src: etc/systemd/system/postgresql.service.j2 dest: "/etc/systemd/system/{{ __postgres_daemon }}.service" mode: 0644 notify: __postgres_restart + register: __postgres_systemd + + - name: just force systemd to reread configs (2.4 and above) + systemd: + daemon_reload: True + when: __postgres_systemd.changed - name: Check if database is initialized stat: