mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't shadow refresh_pillar
This commit is contained in:
parent
d86b03dc90
commit
d9f48ac6ea
1 changed files with 7 additions and 3 deletions
|
@ -310,7 +310,7 @@ def sync_states(saltenv=None, refresh=True):
|
|||
return ret
|
||||
|
||||
|
||||
def refresh_grains(refresh_pillar=True):
|
||||
def refresh_grains(**kwargs):
|
||||
'''
|
||||
.. versionadded:: 2016.3.6,2016.11.4,Nitrogen
|
||||
|
||||
|
@ -330,13 +330,17 @@ def refresh_grains(refresh_pillar=True):
|
|||
|
||||
salt '*' saltutil.refresh_grains
|
||||
'''
|
||||
kwargs = salt.utils.clean_kwargs(**kwargs)
|
||||
_refresh_pillar = kwargs.pop('refresh_pillar', True)
|
||||
if kwargs:
|
||||
salt.utils.invalid_kwargs(kwargs)
|
||||
# Modules and pillar need to be refreshed in case grains changes affected
|
||||
# them, and the module refresh process reloads the grains and assigns the
|
||||
# newly-reloaded grains to each execution module's __grains__ dunder.
|
||||
refresh_modules()
|
||||
if refresh_pillar:
|
||||
if _refresh_pillar:
|
||||
refresh_pillar()
|
||||
return ret
|
||||
return True
|
||||
|
||||
|
||||
def sync_grains(saltenv=None, refresh=True):
|
||||
|
|
Loading…
Add table
Reference in a new issue