From 6ae392ede59b292a05d6b01c996c50454dc499fe Mon Sep 17 00:00:00 2001 From: eHanseJoerg Date: Fri, 9 Mar 2018 10:33:21 +0100 Subject: [PATCH 1/2] [FIX] Assert systemd gets reloaded if odoo.service was changed --- handlers/main.yml | 5 +++++ tasks/service.yml | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 208ada5..247b636 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -5,3 +5,8 @@ name: "{{ odoo_service }}" state: restarted when: odoo_init == True + +- name: Reload Systemd + systemd: + daemon-reload: yes + when: ansible_service_mgr == 'systemd' \ No newline at end of file diff --git a/tasks/service.yml b/tasks/service.yml index 36b7b4f..87e369e 100644 --- a/tasks/service.yml +++ b/tasks/service.yml @@ -17,7 +17,9 @@ force=yes backup=yes when: ansible_service_mgr == 'systemd' - notify: Restart Odoo + notify: + - Reload Systemd + - Restart Odoo when: odoo_install_type == 'standard' - block: @@ -37,7 +39,9 @@ force=yes backup=yes when: ansible_service_mgr == 'systemd' - notify: Restart Odoo + notify: + - Reload Systemd + - Restart Odoo when: odoo_install_type == 'buildout' - block: @@ -57,7 +61,9 @@ force=yes backup=yes when: ansible_service_mgr == 'systemd' - notify: Restart Odoo + notify: + - Reload Systemd + - Restart Odoo when: odoo_install_type == 'pip' - name: Enable Odoo service From cc98c6291a97aa65f66e7d003abb5754ee93ca0d Mon Sep 17 00:00:00 2001 From: eHanseJoerg Date: Fri, 9 Mar 2018 10:37:51 +0100 Subject: [PATCH 2/2] [FIX] Assert systemd gets reloaded if odoo.service was changed --- handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 247b636..a4f508a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -9,4 +9,4 @@ - name: Reload Systemd systemd: daemon-reload: yes - when: ansible_service_mgr == 'systemd' \ No newline at end of file + when: ansible_service_mgr == 'systemd'