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
Adds NG states to php-formula #14
Conversation
… dependency on odict() and cannot recurse its method. Macro.jinja has additional methods that should also be pruned once
@@ -0,0 +1,2 @@ | |||
{% set state = 'adodb' %} | |||
{% include "php/ng/installed.jinja" %} |
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.
I love cheating like this. We only have to write the installation state once and the {{ state }}
variable does the rest of the work for us. It's not dissimilar from doing it with a macro (also used) but arguably simpler.
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.
Clever Jinja trick. Interesting pattern. Not sure I'm a fan though I definitely see the appeal. Will give this some thought.
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.
I completely understand any hesitation. A macro is more explicit, even if it's several lines longer. If there's a negative reaction, I could always rewrite it as a macro. Jinja imports are obviously good for the pattern, includes, however, hadn't really been tried/discussed. Thought I'd give them a look. All-said, this particular set of states are so bare-bones it makes me wish I had some type of state-router with a single real state. As it is, though, the benefits do not likely get anywhere near the costs.
Adds NG states to php-formula
This rather big pull requests adds NG states to the php formula much in the same way we did with NGINX. It does require the helium release (or an updated pillar module) in order to take advantage of
salt.modules.pillar.get(merge=True)
.