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: I5d491104173dc0217fac62618c13e8ac5a57233b
This commit is contained in:
Dmitriy Rabotyagov
committed by
Dmitriy Rabotyagov
parent
2c79d70378
commit
502bfbfda5
2 changed files with 4 additions and 2 deletions
@@ -25,6 +25,7 @@
listen:
- "Restart cloudkitty services"
- "venv changed"
- "systemd service changed"
- name:Start services
systemd:
@@ -38,3 +39,4 @@
listen:
- "Restart cloudkitty services"
- "venv changed"
- "systemd service changed"
@@ -179,8 +179,8 @@
systemd_TasksAccounting:true
systemd_services:
- service_name:"{{ service_var.service_name }}"
enabled:yes
state:started
enabled:"{{ service_var.enabled | default(True) }}"
state:"{{ service_var.state | default('started') }}"
execstarts:"{{ service_var.execstarts }}"
execreloads:"{{ service_var.execreloads | default([]) }}"
config_overrides:"{{ service_var.init_config_overrides }}"
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.