From 34bf0b5ccda67383889099d710167a97623fff19 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Tue, 3 Aug 2021 17:44:57 +0200 Subject: [PATCH] updated provision state --- states/provision/init.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/states/provision/init.sls b/states/provision/init.sls index 71344d7..3abe562 100644 --- a/states/provision/init.sls +++ b/states/provision/init.sls @@ -22,6 +22,7 @@ schedule_pkg_upgrade: schedule.absent: - name: schedule_pkg_upgrade +{%- if specs.default.items()|length > 0 and salt['grains.get']('id') in specs.keys() %} {%- for key, value in specs.default.items() %} {{ key }}: grains.present: @@ -29,3 +30,4 @@ schedule_pkg_upgrade: - value: {% if specs[salt['grains.get']('id')][key] is defined %}{{ specs[salt['grains.get']('id')][key] }}{% else %}{{ value }}{% endif %} - force: true {% endfor %} +{%- endif %}