Merge pull request #22235 from dhs-rec/2014.7

Possible fix for 'puppet.run always returns 0 #20850'
This commit is contained in:
jfindlay 2015-04-01 09:16:28 -06:00
commit 7d57a760bb

View File

@ -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):