Flush the handlers before restarting the services.

This commit is contained in:
Andrea Dell'Amico 2021-07-23 16:05:03 +02:00
parent 10e2cc82b3
commit 707bb6adf7
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 3 additions and 3 deletions

View File

@ -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 }}'