mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28282 from keesbos/git-pillar-env-fix
Fix for __env__ in legacy git_pillar
This commit is contained in:
commit
2f2f51906d
1 changed files with 5 additions and 3 deletions
|
@ -397,9 +397,9 @@ def _legacy_git_pillar(minion_id, repo_string, pillar_dirs):
|
|||
log.warning('Unrecognized extra parameter: {0}'.format(key))
|
||||
|
||||
# environment is "different" from the branch
|
||||
branch, _, environment = branch_env.partition(':')
|
||||
cfg_branch, _, environment = branch_env.partition(':')
|
||||
|
||||
gitpil = _LegacyGitPillar(branch, repo_location, __opts__)
|
||||
gitpil = _LegacyGitPillar(cfg_branch, repo_location, __opts__)
|
||||
branch = gitpil.branch
|
||||
|
||||
if environment == '':
|
||||
|
@ -413,7 +413,9 @@ def _legacy_git_pillar(minion_id, repo_string, pillar_dirs):
|
|||
|
||||
pillar_dirs.setdefault(pillar_dir, {})
|
||||
|
||||
if pillar_dirs[pillar_dir].get(branch, False):
|
||||
if cfg_branch == '__env__' and branch not in ['master', 'base']:
|
||||
gitpil.update()
|
||||
elif pillar_dirs[pillar_dir].get(branch, False):
|
||||
return {} # we've already seen this combo
|
||||
|
||||
pillar_dirs[pillar_dir].setdefault(branch, True)
|
||||
|
|
Loading…
Add table
Reference in a new issue