Skip to content
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

(Use-Case) __stack__ in pillarstack templates #48

Open
nickgarber opened this issue Jul 10, 2018 · 0 comments
Open

(Use-Case) __stack__ in pillarstack templates #48

nickgarber opened this issue Jul 10, 2018 · 0 comments

Comments

@nickgarber
Copy link
Contributor

nickgarber commented Jul 10, 2018

Hi @bbinet ,

This is more of a use-case declaration.

I've been on a multi-year mission to manage Salt data in the pillar in the best and most humane way possible and have landed with increasing conviction on pillarstack as the needed solution.

Pillarstack allows me to treat the world of configuration data as a collection of feature labels to be activated or deactivated, and in this way defining configuration feels more fun and rewarding, like playing a chord on a piano.

It's a wonderful abstraction, enabled by pillarstack.

As I've built onto, refined and come to increasingly rely on this capability I thought I should mention it to you, because it makes use of a profoundly powerful but undocumented feature of pillarstack - the ability to modify and read from the__stack__ variable using Jinja from within the pillarstack.cfg template.

https://github.com/genesis-matrix/gema-plr-core/blob/master/pillarstack.cfg

I use a sub-hierarchy of the pillar, (designated into Question, Answer, Detail tiers), to control the inclusion of pillarstack files. As the sub-hierarchy is traversed information is preserved back into the pillar that is used to inform subsequent traversals. Also as a nicety, this traversal info is organized in the pillar as a log to make the logic "decisions" and outcomes easier to keep track of.

I feel this is exactly the right power in exactly the right place, so I'd like to see it enshrined and protected and celebrated. But just in case there was some need to alter it I'd ask that you keep the benefit and the use case I've described in mind.

Cheers and many thanks for the project,
Nick

[1] https://github.com/genesis-matrix/gema-plr-core/blob/master/pillarstack.cfg

@nickgarber nickgarber changed the title Use-Case for Use-Case for Jinja Access to __stack__ as State variable. Jul 10, 2018
@nickgarber nickgarber changed the title Use-Case for Jinja Access to __stack__ as State variable. (Use-Case) __stack__ in pillarstack templates Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant