mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Run the sync on al environments that are part of the pkg
This commit is contained in:
parent
065ef681db
commit
84afd7b230
@ -769,12 +769,15 @@ def pkg(pkg_path, pkg_sum, hash_type, test=False, **kwargs):
|
|||||||
popts['test'] = True
|
popts['test'] = True
|
||||||
else:
|
else:
|
||||||
popts['test'] = __opts__.get('test', None)
|
popts['test'] = __opts__.get('test', None)
|
||||||
for fn_ in os.listdir(root):
|
envs = os.listdir(root)
|
||||||
|
for fn_ in envs:
|
||||||
full = os.path.join(root, fn_)
|
full = os.path.join(root, fn_)
|
||||||
if not os.path.isdir(full):
|
if not os.path.isdir(full):
|
||||||
continue
|
continue
|
||||||
popts['file_roots'][fn_] = [full]
|
popts['file_roots'][fn_] = [full]
|
||||||
st_ = salt.state.State(popts)
|
st_ = salt.state.State(popts)
|
||||||
|
st_.functions['saltutil.sync_all'](envs)
|
||||||
|
st_.module_refresh()
|
||||||
ret = st_.call_chunks(lowstate)
|
ret = st_.call_chunks(lowstate)
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(root)
|
shutil.rmtree(root)
|
||||||
|
Loading…
Reference in New Issue
Block a user