Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed. We knowingly prevent systemd_service role handlers to execute by providing `state: started` as otherwise service will be restarted twice. With that now we ensure that role handlers will also listen for systemd unit changes. Change-Id: Ia9d1164e1e38201244a062be95f936b314c5c56b
This commit is contained in:
parent
e7099c1e47
commit
e9fab281bd
@ -22,6 +22,7 @@
|
||||
with_list: "{{ filtered_ironic_services }}"
|
||||
listen:
|
||||
- "venv changed"
|
||||
- "systemd service changed"
|
||||
|
||||
- name: Restart tftpd
|
||||
service:
|
||||
|
@ -262,8 +262,8 @@ filtered_ironic_services: |-
|
||||
{% set _ = value.update(
|
||||
{
|
||||
'service_key': key,
|
||||
'enabled': 'yes',
|
||||
'state': 'started',
|
||||
'enabled': value['enabled'] | default(True),
|
||||
'state': value['state'] | default('started'),
|
||||
'config_overrides': value.init_config_overrides
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user