From 496f09b2e1c2ba88d8df95ec0c0011fce0d4a7a7 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Thu, 10 Sep 2020 04:06:20 +0200 Subject: [PATCH] style(state): avoid complicated comparison --- cron/defaults.yaml | 1 + cron/service/running.sls | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cron/defaults.yaml b/cron/defaults.yaml index 5f33b14..6c3d0f7 100644 --- a/cron/defaults.yaml +++ b/cron/defaults.yaml @@ -4,3 +4,4 @@ cron: pkg: cronie service: cron + enabled: true diff --git a/cron/service/running.sls b/cron/service/running.sls index 6aaad1b..0c81f4e 100644 --- a/cron/service/running.sls +++ b/cron/service/running.sls @@ -6,7 +6,7 @@ {%- from tplroot ~ "/map.jinja" import cron with context %} cron.service: -{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %} +{%- if cron.enabled %} service.running: - name: {{ cron.service }} - enable: true