-
Notifications
You must be signed in to change notification settings - Fork 296
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
feat(map): update to v4 and add config.get lookup from multiple roots #186
Conversation
Best reviewed: commit by commit
Optimal code review plan
|
The `map.jinja` now exports a single variable called `mapdata`. We extract the `openssh`, `sshd_config` and `ssh_config` from it to minimize the changes to `.sls` files.
986518d
to
2adbb2d
Compare
We avoid compatibility break with user pillars by looking up configuration values using `config.get` in configurable roots. We provide a new parameter `map_jinja:config_get_roots` in the formula `parameters/defaults.yaml`to retrives values not only from `tplroot=openssh` but from `sshd_config` and `ssh_config` too. We need to update the `_mapdata` reference files to include the new `map_jinja:config_get_roots`.
2adbb2d
to
ad4385b
Compare
BREAKING CHANGE: `map.jinja` has been upgraded from using `pillar.get` to `config.get`.
Merged, excellent work @baby-gnu! |
@baby-gnu Something worth thinking about (for v6 of https://freenode.logbot.info/saltstack-formulas/20200730#c4572975-c4573065
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Note: Checked this across all platforms in Travis and only failing on CentOS-6, as expected from our discussions in Slack/IRC: |
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
saltstack-formulas/libvirt-formula#79
Describe the changes you're proposing
Use the new v4
map.jinja
and maintain the compatibility with user pillars by configuring a newmap_jinja:config_get_roots
parameter.The
map.jinja
use the generic exported namemapdata
as in the latestlibvirt-formula
.Pillar / config required to test the proposed changes
It's already provided by
test/salt/pillar/default.sls
.Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context