From 707bb6adf7bbda0d6bd5c5764c83785ff65beca8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 23 Jul 2021 16:05:03 +0200 Subject: [PATCH] Flush the handlers before restarting the services. --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index ff22ee0..324cded 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -86,14 +86,14 @@ notify: systemd reload register: springboot_app_restart + - name: Force all notified handlers to run at this point, not waiting for normal sync points + meta: flush_handlers + - name: Restart the springboot apps if the systemd unit changed service: name={{ item.name }} state=restarted with_items: '{{ springboot_apps }}' when: springboot_app_restart is changed - - name: Force all notified handlers to run at this point, not waiting for normal sync points - meta: flush_handlers - - name: Install the springboot logrotate configuration template: src=springboot-logrotate.j2 dest=/etc/logrotate.d/{{ item.name }} owner=root group=root mode=0444 with_items: '{{ springboot_apps }}'