mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #2281 from sjoeboo/develop
fix to make puppet.run work with 3.0 upwards, should work on 2.7 and 2.6 release as well
This commit is contained in:
commit
fc5d7eda78
@ -18,7 +18,7 @@ def _check_puppet():
|
||||
# I thought about making this a virtual module, but then I realized that I
|
||||
# would require the minion to restart if puppet was installed after the
|
||||
# minion was started, and that would be rubbish
|
||||
utils.check_or_die('puppetd')
|
||||
utils.check_or_die('puppet')
|
||||
|
||||
def _check_facter():
|
||||
'''
|
||||
@ -40,7 +40,7 @@ def run(tags=None):
|
||||
'''
|
||||
Execute a puppet run and return a dict with the stderr, stdout,
|
||||
return code, etc. If an argument is specified, it is treated as
|
||||
a comma separated list of tags passed to puppetd --test --tags:
|
||||
a comma separated list of tags passed to puppet --test --tags:
|
||||
http://projects.puppetlabs.com/projects/1/wiki/Using_Tags
|
||||
|
||||
CLI Examples::
|
||||
@ -52,9 +52,9 @@ def run(tags=None):
|
||||
_check_puppet()
|
||||
|
||||
if not tags:
|
||||
cmd = 'puppetd --test'
|
||||
cmd = 'puppet --test'
|
||||
else:
|
||||
cmd = 'puppetd --test --tags "{0}"'.format(tags)
|
||||
cmd = 'puppet --test --tags "{0}"'.format(tags)
|
||||
|
||||
return __salt__['cmd.run_all'](cmd)
|
||||
|
||||
@ -62,7 +62,7 @@ def noop(tags=None):
|
||||
'''
|
||||
Execute a puppet noop run and return a dict with the stderr, stdout,
|
||||
return code, etc. If an argument is specified, it is treated as a
|
||||
comma separated list of tags passed to puppetd --test --noop --tags
|
||||
comma separated list of tags passed to puppet --test --noop --tags
|
||||
|
||||
CLI Example::
|
||||
|
||||
@ -73,9 +73,9 @@ def noop(tags=None):
|
||||
_check_puppet()
|
||||
|
||||
if not tags:
|
||||
cmd = 'puppetd --test --noop'
|
||||
cmd = 'puppet --test --noop'
|
||||
else:
|
||||
cmd = 'puppetd --test --tags "{0}" --noop'.format(tags)
|
||||
cmd = 'puppet --test --tags "{0}" --noop'.format(tags)
|
||||
|
||||
return __salt__['cmd.run_all'](cmd)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user