Merge pull request #18856 from saltstack/revert-18687-develop

Revert "Support multiple roots per environment for external pillars S3 a...
This commit is contained in:
Thomas S Hatch 2014-12-09 14:56:10 -07:00
commit 2d48deb074
2 changed files with 5 additions and 4 deletions

View File

@ -294,13 +294,14 @@ def ext_pillar(minion_id,
# Don't recurse forever-- the Pillar object will re-call the ext_pillar
# function
if pillar_dir in __opts__['pillar_roots'].get(branch, []):
if __opts__['pillar_roots'].get(branch, []) == [pillar_dir]:
return {}
gitpil.update()
opts = deepcopy(__opts__)
opts['pillar_roots'].setdefault(branch, []).append(pillar_dir)
opts['pillar_roots'][branch] = [pillar_dir]
pil = Pillar(opts, __grains__, minion_id, branch)

View File

@ -112,7 +112,7 @@ def ext_pillar(minion_id,
pillar_dir = os.path.normpath(os.path.join(_get_cache_dir(), environment,
bucket))
if pillar_dir in __opts__['pillar_roots'].get(environment, []):
if __opts__['pillar_roots'].get(environment, []) == [pillar_dir]:
return {}
metadata = _init(s3_creds, multiple_env, environment)
@ -134,7 +134,7 @@ def ext_pillar(minion_id,
log.info('Sync local pillar cache from S3 completed.')
opts = deepcopy(__opts__)
opts['pillar_roots'].setdefault(environment, []).append(pillar_dir)
opts['pillar_roots'][environment] = [pillar_dir]
pil = Pillar(opts, __grains__, minion_id, environment)