Fix for pillar setting 'environment' key in __gen_opts()

7a6e402 added ``environment`` as a key in the master opts. This had the
unfortunate side effect of breaking the dynamic pillar feature in
git_pillar, which relies on pillar setting this opts key to the value
from the minion opts.
This commit is contained in:
Erik Johnson 2016-11-16 01:10:54 -06:00
parent 8dea695c7c
commit 433737d2dc

View file

@ -348,7 +348,7 @@ class Pillar(object):
opts['grains'] = {}
else:
opts['grains'] = grains
if 'environment' not in opts:
if not opts.get('environment'):
opts['environment'] = saltenv
opts['id'] = self.minion_id
if 'pillarenv' not in opts: