Merge pull request #37979 from terminalmage/revert-pillar-change

Revert addition of pillar_roots_override_ext_pillar
This commit is contained in:
Mike Place 2016-11-30 07:34:23 -07:00 committed by GitHub
commit ca3a9488f1
2 changed files with 7 additions and 37 deletions

View file

@ -2459,24 +2459,6 @@ Default: ``[]``
There are additional details at :ref:`salt-pillars`
.. conf_master:: pillar_roots_override_ext_pillar
``pillar_roots_override_ext_pillar``
------------------------------------
.. versionadded:: 2016.11.0
Default: ``False``
This option allows for external pillar sources to be evaluated before
:conf_master:`pillar_roots`, which means that values obtained from
:conf_master:`pillar_roots` take precedence over those found from
:conf_master:`ext_pillar` sources.
.. code-block:: yaml
pillar_roots_override_ext_pillar: False
.. conf_master:: ext_pillar_first
``ext_pillar_first``
@ -2488,8 +2470,7 @@ Default: ``False``
This option allows for external pillar sources to be evaluated before
:conf_master:`pillar_roots`. This allows for targeting file system pillar from
ext_pillar. Note that ext_pillar_first option is deprecated by
pillar_roots_override_ext_pillar option and will be removed in future releases.
ext_pillar.
.. code-block:: yaml

View file

@ -780,27 +780,16 @@ class Pillar(object):
'''
top, top_errors = self.get_top()
if ext:
if self.opts.get('pillar_roots_override_ext_pillar', False) or self.opts.get('ext_pillar_first', False):
salt.utils.warn_until('Nitrogen',
'The \'ext_pillar_first\' option has been deprecated and '
'replaced by \'pillar_roots_override_ext_pillar\'.'
)
if self.opts.get('ext_pillar_first', False):
self.opts['pillar'], errors = self.ext_pillar({}, pillar_dirs)
self.rend = salt.loader.render(self.opts, self.functions)
matches = self.top_matches(top)
pillar, errors = self.render_pillar(matches, errors=errors)
if self.opts.get('pillar_roots_override_ext_pillar', False):
pillar = merge(self.opts['pillar'],
pillar,
self.merge_strategy,
self.opts.get('renderer', 'yaml'),
self.opts.get('pillar_merge_lists', False))
else:
pillar = merge(pillar,
self.opts['pillar'],
self.merge_strategy,
self.opts.get('renderer', 'yaml'),
self.opts.get('pillar_merge_lists', False))
pillar = merge(self.opts['pillar'],
pillar,
self.merge_strategy,
self.opts.get('renderer', 'yaml'),
self.opts.get('pillar_merge_lists', False))
else:
matches = self.top_matches(top)
pillar, errors = self.render_pillar(matches)