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: Ic56d5d1bd1ead8fd6bb642913370fa206799256f
This commit is contained in:
parent
7000e35a6c
commit
ec2caff080
|
@ -27,6 +27,7 @@
|
|||
listen:
|
||||
- "Restart aodh services"
|
||||
- "venv changed"
|
||||
- "systemd service changed"
|
||||
|
||||
- name: Start services
|
||||
service:
|
||||
|
@ -42,3 +43,4 @@
|
|||
listen:
|
||||
- "Restart aodh services"
|
||||
- "venv changed"
|
||||
- "systemd service changed"
|
||||
|
|
|
@ -23,8 +23,8 @@ filtered_aodh_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…
Reference in New Issue