Skip to content

Commit

Permalink
Merge pull request #22235 from dhs-rec/2014.7
Browse files Browse the repository at this point in the history
Possible fix for 'puppet.run always returns 0 #20850'
  • Loading branch information
jfindlay committed Apr 1, 2015
2 parents 63919a3 + 9c8f5f8 commit 7d57a76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions salt/modules/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ def arguments(self, args=None):
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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 7d57a76

Please sign in to comment.