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: I4273d2fbcbff3028e693e3274093c1afebdcfca2
This commit is contained in:
parent
b6e904213e
commit
94690a06da
@ -70,6 +70,7 @@
|
||||
- "Restart nova services"
|
||||
- "venv changed"
|
||||
- "cert installed"
|
||||
- "systemd service changed"
|
||||
|
||||
- name: Start services
|
||||
service:
|
||||
@ -86,3 +87,4 @@
|
||||
- "Restart nova services"
|
||||
- "venv changed"
|
||||
- "cert installed"
|
||||
- "systemd service changed"
|
||||
|
@ -41,7 +41,14 @@ filtered_nova_services: |-
|
||||
(('condition' not in value) or
|
||||
('condition' in value and value['condition'])) and
|
||||
not ('wsgi_app' in value and value['wsgi_app']) %}
|
||||
{% set _ = value.update({'service_key': key}) %}
|
||||
{% set _ = value.update(
|
||||
{
|
||||
'service_key': key,
|
||||
'enabled': value['enabled'] | default(True),
|
||||
'state': value['state'] | default('started')
|
||||
}
|
||||
)
|
||||
%}
|
||||
{% set _ = services.append(value) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user