From 1ae8918f1efee2764fbfe5fd0ba69993d81fce58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez?= <45817749+danrodrig@users.noreply.github.com> Date: Tue, 11 May 2021 16:02:57 +0200 Subject: [PATCH] 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. --- keepalived/service/running.sls | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keepalived/service/running.sls b/keepalived/service/running.sls index 305ead5..5cac393 100644 --- a/keepalived/service/running.sls +++ b/keepalived/service/running.sls @@ -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 }}