-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map.jinja: use grains.filter_by instead of defaults.merge #25
Conversation
@alxwr Excellent, looking good at a first glance. Glad you added |
@myii Thanks for testing! |
template/osfingermap.yaml
Outdated
# | ||
# Setup variables using grains['osfinger'] based logic. | ||
# You just need to add the key:values for an `osfinger` that differ | ||
# from `defaults.yaml` + `os_family.yaml`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxwr If you're still around, then this will be:
`defaults.yaml` + `os_family.yaml` + `osmap.yaml`
If not, I'll merge anyway and add that to a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :-) Thanks for the review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxwr Don't go anywhere! I've got another point that needs to be resolved. Give me 2-3 minutes...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxwr Just need this last fix and we're good to go, thanks!
template/map.jinja
Outdated
@@ -5,18 +5,18 @@ | |||
{% import_yaml 'template/defaults.yaml' as defaults %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaults
=> default_settings
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sry, I missed that. (It's late here.)
{## Merge the lookup ##} | ||
{% set lookup = salt['pillar.get']('template:lookup', default={}) %} | ||
{% do salt['defaults.merge'](defaults['template'], lookup) %} | ||
{% set defaults = salt['grains.filter_by'](default_settings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this change here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxwr Just need this last fix and we're good to go, thanks!
Should be fixed now. Thanks for reviewing!
because defaults.merge does not work with salt-ssh. saltstack/salt#51605 Added osfingermap.yaml.
@alxwr Fantastic, thanks for the extra effort. Merged. |
@noelmcloughlin has a PR (saltstack-formulas/firewalld-formula#29) that mentions that there is no |
salt-ssh
saltstack/salt#51605