Skip to content

Commit

Permalink
fix(service): service restart handling with watch requisite
Browse files Browse the repository at this point in the history
Previously, the state for the keepalived service included the enable
attribute. This would prevent the watch requisite to restart the service
if the service was already running but not enabled.

For reference, https://docs.saltproject.io/en/latest/ref/states/requisites.html#watch

Split service handling in service.enabled and service.running.
  • Loading branch information
danrodrig committed Jun 4, 2021
1 parent 032afac commit 1ae8918
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion keepalived/service/running.sls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ include:
keepalived-service-running-service-running:
service.running:
- name: {{ keepalived.service.name }}
- enable: True
- watch:
- sls: {{ sls_config_file }}
keepalived-service-running-service-enabled:
service.enabled:
- name: {{ keepalived.service.name }}

0 comments on commit 1ae8918

Please sign in to comment.