salt
salt copied to clipboard
implement ignore_missing for /srv/salt/top.sls as well
Description of Issue/Question
The ignore_missing: True
option at the pillar top.sls file allows us to include a file only if it exists. Such an option would be useful to have for the salt top.sls file as well.
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
/srv/salt/top.sls
{% set roles = salt['grains.get']('roles', []) %}
base:
'*':
- role.base
{% for role in roles %}
'role:{{ role }}':
- match: grain
#- ignore_missing: True
- role.{{ role }}
{% endfor %}