fix(service): service restart handling with watch requisite

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.
This commit is contained in:
Daniel Rodríguez 2021-05-11 16:02:57 +02:00
parent 032afac441
commit 1ae8918f1e

View File

@ -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 }}