diff options
author | Georg Pfuetzenreuter | 2023-01-29 14:03:46 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-29 14:09:49 +0100 |
commit | 002fad5f2706cfc609fb49dd56a75e6dd12dd5da (patch) | |
tree | debd162ca900047d8a3d447cc8a779eb7195d4d9 | |
parent | bd7fe25eb06bbd1db36ce7e338820703dd79b62d (diff) | |
download | salt-002fad5f2706cfc609fb49dd56a75e6dd12dd5da.tar.gz salt-002fad5f2706cfc609fb49dd56a75e6dd12dd5da.tar.bz2 salt-002fad5f2706cfc609fb49dd56a75e6dd12dd5da.zip |
salt.minion: allow minions without roles
If-clause to check for Syndic roles caused regression on minions without
any assigned roles.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
-rw-r--r-- | salt/profile/salt/minion.sls | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/salt/profile/salt/minion.sls b/salt/profile/salt/minion.sls index d9265c4..12bef1d 100644 --- a/salt/profile/salt/minion.sls +++ b/salt/profile/salt/minion.sls @@ -1,5 +1,5 @@ {%- set netbox_pillar = salt['pillar.get']('netbox') -%} -{%- if 'custom_fields' in netbox_pillar and 'salt.syndic' in netbox_pillar['custom_fields']['salt_roles'] -%} +{%- if 'custom_fields' in netbox_pillar and netbox_pillar['custom_fields']['salt_roles'] is not none and 'salt.syndic' in netbox_pillar['custom_fields']['salt_roles'] -%} {%- set master = salt['pillar.get']('salt:master:syndic_master') -%} {%- elif 'config_context' in netbox_pillar -%} {%- set master = netbox_pillar['config_context']['salt_master'] -%} |