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

Fix regression for old salt versions and bugfix for event_return_whitelist/event_return_blacklist options #79

Merged
merged 3 commits into from
Dec 24, 2014

Conversation

rhertzog
Copy link
Contributor

The first two commits should fix a regression for old salt versions (introduced with #76) due to the fact that the included salt/formulas.jinja will fail to compile complaining that the variable "salt" doesn't exist. This is fixed first by not shadowing the global salt variable in all the templates and then by adding an explicit "with context" so that jinja copies over the context.

The last commit fixes a bug with the way the event_return_whitelist/event_return_blacklist options were managed.

Most include do not expect salt to be something else than the usual salt
variable giving access to all the salt modules. Instead we use cfg_salt.
And for consistency we rename the master/minion variables to
cfg_master/cfg_minion too.
This is only needed for salt versions older than 2014.7 that do not
define the global "salt" variable in such context.
If those options are set in pillar data, the jinja template
salt/files/master.d/_defaults.conf would fail to compile trying to
evaluate non-existing variables.

Replace those variables with the corresponding dictionnary entries.
gravyboat added a commit that referenced this pull request Dec 24, 2014
Fix regression for old salt versions and bugfix for event_return_whitelist/event_return_blacklist options
@gravyboat gravyboat merged commit c0af23f into saltstack-formulas:master Dec 24, 2014
@gravyboat
Copy link
Contributor

Good fix, thanks @rhertzog!

@rhertzog rhertzog deleted the misc-bugfixes branch December 27, 2014 09:06
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

Successfully merging this pull request may close these issues.

2 participants