Skip to content

Commit

Permalink
run puppet with python_shell=True on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Bakker committed Feb 17, 2016
1 parent e6c01bb commit 174663e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion salt/modules/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def __init__(self):
self.vardir = 'C:\\ProgramData\\PuppetLabs\\puppet\\var'
self.rundir = 'C:\\ProgramData\\PuppetLabs\\puppet\\run'
self.confdir = 'C:\\ProgramData\\PuppetLabs\\puppet\\etc'
self.useshell = True
else:
self.useshell = False
if 'Enterprise' in __salt__['cmd.run']('puppet --version'):
self.vardir = '/var/opt/lib/pe-puppet'
self.rundir = '/var/opt/run/pe-puppet'
Expand Down Expand Up @@ -158,7 +160,7 @@ def run(*args, **kwargs):

puppet.kwargs.update(salt.utils.clean_kwargs(**kwargs))

ret = __salt__['cmd.run_all'](repr(puppet), python_shell=False)
ret = __salt__['cmd.run_all'](repr(puppet), python_shell=puppet.useshell)
if ret['retcode'] in [0, 2]:
ret['retcode'] = 0
else:
Expand Down

0 comments on commit 174663e

Please sign in to comment.