move condition to avoid wrong notic about schedule not set in pillar

This commit is contained in:
m0duspwnens
2021-06-18 15:30:51 -04:00
parent 48c3cb4816
commit c7a58816b6

View File

@@ -1,4 +1,5 @@
{% if salt['pillar.get']('patch:os:schedule_name') and salt['service.status']('salt-minion', True) %}
{% if salt['pillar.get']('patch:os:schedule_name') %}
{% if salt['service.status']('salt-minion', True) %}
{% set patch_os_pillar = salt['pillar.get']('patch:os') %}
{% set schedule_name = patch_os_pillar.schedule_name %}
{% set splay = patch_os_pillar.get('splay', 300) %}
@@ -62,6 +63,7 @@ remove_patch_os_schedule:
{% endif %}
{% endif %}
{% else %}
no_patch_os_schedule_name_set: