1 2 3 4 5 6 7 8 9 10 11
{%- set myconfig = pillar['netbox']['config_context'] -%} salt: minion_remove_config: True minion: master_type: str master: {{ myconfig['salt_master'] }} {%- if 'roles' in myconfig and myconfig['roles'] | length > 0 %} grains: roles: {{ myconfig['roles'] }} {%- endif %}