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: I001ffdb5eedfb8d17edd593dfb1818c5b1bd02df
This commit is contained in:
parent
d643b6026f
commit
8c0744496b
|
@ -23,3 +23,4 @@
|
|||
delay: 2
|
||||
listen:
|
||||
- "venv changed"
|
||||
- "systemd service changed"
|
||||
|
|
|
@ -29,8 +29,8 @@ filtered_blazar_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