map.jinja: use grains.filter_by instead of defaults.merge#25
map.jinja: use grains.filter_by instead of defaults.merge#25myii merged 2 commits intosaltstack-formulas:masterfrom
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.
@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.
Done :-) Thanks for the review!
There was a problem hiding this comment.
@alxwr Don't go anywhere! I've got another point that needs to be resolved. Give me 2-3 minutes...
template/map.jinja
Outdated
| @@ -5,18 +5,18 @@ | |||
| {% import_yaml 'template/defaults.yaml' as defaults %} | |||
There was a problem hiding this comment.
defaults => default_settings!
There was a problem hiding this comment.
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.
@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-sshsaltstack/salt#51605