saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.13k stars 5.47k forks source link

implement ignore_missing for /srv/salt/top.sls as well #44597

Open tampakrap opened 6 years ago

tampakrap commented 6 years ago

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 %}
garethgreenaway commented 6 years ago

@tampakrap Thanks for the report. This would be a useful feature to have.

mchugh19 commented 6 years ago

This seems to be a dupe for #16687 (I found this issue when also looking for this functionality)

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

mchugh19 commented 5 years ago

This is still a valid feature request

stale[bot] commented 5 years ago

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

mchugh19 commented 4 years ago

Still a valid feature request

stale[bot] commented 4 years ago

Thank you for updating this issue. It is no longer marked as stale.

cdalvaro commented 1 year ago

Still requested

cdalvaro commented 9 hours ago

Please, don't forget this request