diff --git a/salt/pillar/git_pillar.py b/salt/pillar/git_pillar.py index 4e71809594..4e662cb29d 100644 --- a/salt/pillar/git_pillar.py +++ b/salt/pillar/git_pillar.py @@ -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) diff --git a/salt/pillar/s3.py b/salt/pillar/s3.py index b0a831e5e4..bb301ab9e3 100644 --- a/salt/pillar/s3.py +++ b/salt/pillar/s3.py @@ -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)