mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #22235 from dhs-rec/2014.7
Possible fix for 'puppet.run always returns 0 #20850'
This commit is contained in:
commit
7d57a760bb
@ -124,8 +124,7 @@ class _Puppet(object):
|
||||
if self.subcmd == 'agent':
|
||||
# no arguments are required
|
||||
args.extend([
|
||||
'onetime', 'verbose', 'ignorecache', 'no-daemonize',
|
||||
'no-usecacheonfailure', 'no-splay', 'show_diff'
|
||||
'test'
|
||||
])
|
||||
|
||||
# finally do this after subcmd has been matched for all remaining args
|
||||
@ -167,7 +166,10 @@ def run(*args, **kwargs):
|
||||
|
||||
puppet.kwargs.update(salt.utils.clean_kwargs(**kwargs))
|
||||
|
||||
return __salt__['cmd.run_all'](repr(puppet), python_shell=False)
|
||||
if __salt__['cmd.run_all'](repr(puppet), python_shell=False) in [0, 2]:
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
|
||||
def noop(*args, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user