salt.minion: allow minions without roles
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful
If-clause to check for Syndic roles caused regression on minions without any assigned roles. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
bd7fe25eb0
commit
002fad5f27
@ -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'] -%}
|
||||
|
Loading…
Reference in New Issue
Block a user