I need to exclude certain minions marked with either of these custom added grains from getting a software installation Salt state:
exclude:
- applications
- application_xyz
The following syntax that works, and prevents any minions with the "applications" grain from installing anything:
{% if not "applications" in grains.get('exclude', []) %}
But now I need to get more specific, and that's where I thought using "or" logic made sense. So far I've tried the following, neither of which work:
{% if not "applications" or "application_xyz" in grains.get('exclude', []) %}
{% if not "applications" in grains.get('exclude', []) or not "application_xyz" in grains.get('exclude', []) %}
I used How to use logic operators in jinja template on salt-stack (AND, OR) as some reference, so I feel that I may be on the right track.
Any help or advice is hugely appreciated!