Open faudebert opened 4 years ago
Best reviewed: commit by commit
Powered by Pull Assistant. Last update 4edd99f ... 5d1addc. Read the comment docs.
@sticky-note Would you mind reviewing this PR?
Rebased on master
and followed @daks advice regarding using relative includes (thanks!).
Let me know if I can do anything to help with the merge process.
@daks @faudebert @noelmcloughlin Sorry for latency.
@faudebert Is that possible to make use of map.jinja from template-formula
.
I think it is the best moment to integrate this.
-> https://github.com/saltstack-formulas/template-formula/blob/5d36fda7a473a5aefbf4ff80cb9747cf608771c9/TEMPLATE/map.jinja
You can remove all between the REMOVEME
tags and all after this line https://github.com/saltstack-formulas/template-formula/blob/5d36fda7a473a5aefbf4ff80cb9747cf608771c9/TEMPLATE/map.jinja#L54.
And you can do post processing if needed after this line too.
Thanks
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
None.
Describe the changes you're proposing
This pull-request makes (hopefully) better use of
jinja.map
and allows to seamlessly rename meta-state. While not useful per se for the official repository, renaming permits easier reusability when forking the formula (ex. you want to use both original and forked formulas in your environment).Pillar / config required to test the proposed changes
No specific pillar is required. If my changes are correct, you should not see any visible changes when applying your state.
If interested, you could test meta-state renaming (ex.
mv nginx-formula/{nginx,mynginx}
). Considering no other changes have been made, you should be able to usemynginx
meta-state as drop-in replacement fornginx
. Also note that pillar namespace defaults to the meta-state name (i.e.mynginx
in that example).Optionnaly, you can customize the formula pillar namespace by setting
{meta-state-name}:pillar:namespace
pillar (ex.mynginx:pillar:namespace: mynginx2
).Debug log showing how the proposed changes work
None for now.
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context