|
|
@ -32,6 +32,13 @@ options:
|
|
|
|
manifest:
|
|
|
|
manifest:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Path to the manifest file to run puppet apply on.
|
|
|
|
- Path to the manifest file to run puppet apply on.
|
|
|
|
|
|
|
|
noop:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Override puppet.conf noop mode.
|
|
|
|
|
|
|
|
- Undefined, use default or puppet.conf value if defined.
|
|
|
|
|
|
|
|
- true, Run Puppet agent with C(--noop) switch set.
|
|
|
|
|
|
|
|
- false, Run Puppet agent with C(--no-noop) switch set.
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
facts:
|
|
|
|
facts:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- A dict of values to pass in as persistent external facter facts.
|
|
|
|
- A dict of values to pass in as persistent external facter facts.
|
|
|
@ -104,6 +111,10 @@ EXAMPLES = '''
|
|
|
|
puppet:
|
|
|
|
puppet:
|
|
|
|
tags: update,nginx
|
|
|
|
tags: update,nginx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run puppet agent in noop mode
|
|
|
|
|
|
|
|
puppet:
|
|
|
|
|
|
|
|
noop: true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run a manifest with debug, log to both syslog and stdout, specify module path
|
|
|
|
- name: Run a manifest with debug, log to both syslog and stdout, specify module path
|
|
|
|
puppet:
|
|
|
|
puppet:
|
|
|
|
modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
|
|
|
|
modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
|
|
|
@ -148,6 +159,7 @@ def main():
|
|
|
|
puppetmaster=dict(type='str'),
|
|
|
|
puppetmaster=dict(type='str'),
|
|
|
|
modulepath=dict(type='str'),
|
|
|
|
modulepath=dict(type='str'),
|
|
|
|
manifest=dict(type='str'),
|
|
|
|
manifest=dict(type='str'),
|
|
|
|
|
|
|
|
noop=dict(required=False, type='bool'),
|
|
|
|
logdest=dict(type='str', default='stdout', choices=['stdout',
|
|
|
|
logdest=dict(type='str', default='stdout', choices=['stdout',
|
|
|
|
'syslog',
|
|
|
|
'syslog',
|
|
|
|
'all']),
|
|
|
|
'all']),
|
|
|
@ -230,8 +242,11 @@ def main():
|
|
|
|
cmd += " --certname='%s'" % p['certname']
|
|
|
|
cmd += " --certname='%s'" % p['certname']
|
|
|
|
if module.check_mode:
|
|
|
|
if module.check_mode:
|
|
|
|
cmd += " --noop"
|
|
|
|
cmd += " --noop"
|
|
|
|
else:
|
|
|
|
elif 'noop' in p:
|
|
|
|
cmd += " --no-noop"
|
|
|
|
if p['noop']:
|
|
|
|
|
|
|
|
cmd += " --noop"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
cmd += " --no-noop"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
cmd = "%s apply --detailed-exitcodes " % base_cmd
|
|
|
|
cmd = "%s apply --detailed-exitcodes " % base_cmd
|
|
|
|
if p['logdest'] == 'syslog':
|
|
|
|
if p['logdest'] == 'syslog':
|
|
|
@ -248,8 +263,11 @@ def main():
|
|
|
|
cmd += " --tags '%s'" % ','.join(p['tags'])
|
|
|
|
cmd += " --tags '%s'" % ','.join(p['tags'])
|
|
|
|
if module.check_mode:
|
|
|
|
if module.check_mode:
|
|
|
|
cmd += "--noop "
|
|
|
|
cmd += "--noop "
|
|
|
|
else:
|
|
|
|
elif 'noop' in p:
|
|
|
|
cmd += "--no-noop "
|
|
|
|
if p['noop']:
|
|
|
|
|
|
|
|
cmd += " --noop"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
cmd += " --no-noop"
|
|
|
|
if p['execute']:
|
|
|
|
if p['execute']:
|
|
|
|
cmd += " --execute '%s'" % p['execute']
|
|
|
|
cmd += " --execute '%s'" % p['execute']
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|