Add pillar_opts option. This is turned on by default!

This adds the master config file options to the pillar, this means
that all of the config data on the master config is available via
pillar now. Fix #1886
This commit is contained in:
Thomas S Hatch 2012-10-10 23:53:01 -06:00
parent 784f180ecf
commit 418e5af7ce
2 changed files with 6 additions and 0 deletions

View file

@ -256,6 +256,10 @@
# - hiera: /etc/hiera.yaml
# - cmd_yaml: cat /etc/salt/yaml
#
# The pillar_opts option adds the master configuration file data to a dict in
# the pillar called "master". This is used to set simple configurations in the
# master config file that can then be used on minions.
#pillar_opts: True
##### Syndic settings #####
##########################################

View file

@ -339,6 +339,8 @@ class Pillar(object):
pillar, errors = self.render_pillar(matches)
pillar.update(self.ext_pillar())
errors.extend(terrors)
if self.opts.get('pillar_opts', False):
pillar['master'] = self.opts
if errors:
for error in errors:
log.critical('Pillar render error: {0}'.format(error))