Reload systemd after installing a service unit override

If systemd_service is used to install only an override for an existing
unit it is necessary to reload the systemd daemon for the override
to take effect.

Change-Id: I64c0203ee13b3abbc441274c9304b7103a0bb23c
This commit is contained in:
Jonathan Rosser 2022-04-14 17:26:20 +01:00
parent fcd5233302
commit ba6c16ad26

View File

@ -101,6 +101,7 @@
when: "'systemd_overrides' in item" when: "'systemd_overrides' in item"
notify: notify:
- systemd service changed - systemd service changed
register: systemd_override_result
tags: tags:
- systemd-service - systemd-service
@ -138,7 +139,7 @@
systemd: systemd:
daemon_reload: yes daemon_reload: yes
when: when:
- (systemd_services_result is changed) or (systemd_timer_result is changed) or ('true' in systemd_socket.results | map(attribute='changed') | list ) - (systemd_services_result is changed) or (systemd_timer_result is changed) or (systemd_override_result is changed ) or ('true' in systemd_socket.results | map(attribute='changed') | list )
- include_tasks: systemd_load.yml - include_tasks: systemd_load.yml
loop: "{{ systemd_services }}" loop: "{{ systemd_services }}"