puppet – Runs puppet
puppet – Runs puppet
New in version 2.0.
Synopsis
- Runs puppet agent or apply in a reliable manner.
Requirements
The below requirements are needed on the host that executes this module.
- puppet
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
certname string added in 2.1 |
The name to use when handling certificates. | |
debug boolean added in 2.7 |
|
Enable full debugging. |
environment string |
Puppet environment to be used. | |
execute string added in 2.1 |
Execute a specific piece of Puppet code. It has no effect with a puppetmaster. | |
facter_basename string |
Default: "ansible" |
Basename of the facter output file. |
facts dictionary |
A dict of values to pass in as persistent external facter facts. | |
logdest string added in 2.1 |
|
Where the puppet logs should go, if puppet apply is being used.
|
manifest string |
Path to the manifest file to run puppet apply on. | |
modulepath string added in 2.4 |
Path to an alternate location for puppet modules. | |
noop boolean added in 2.8 |
|
Override puppet.conf noop mode. When When When unset (default), use default or puppet.conf value if defined. |
puppetmaster string |
The hostname of the puppetmaster to contact. | |
summarize boolean added in 2.7 |
|
Whether to print a transaction summary. |
tags list added in 2.1 |
A list of puppet tags to be used. | |
timeout string |
Default: "30m" |
How long to wait for puppet to finish. |
verbose boolean added in 2.7 |
|
Print extra information. |
Examples
- name: Run puppet agent and fail if anything goes wrong
puppet:
- name: Run puppet and timeout in 5 minutes
puppet:
timeout: 5m
- name: Run puppet using a different environment
puppet:
environment: testing
- name: Run puppet using a specific certname
puppet:
certname: agent01.example.com
- name: Run puppet using a specific piece of Puppet code. Has no effect with a puppetmaster
puppet:
execute: include ::mymodule
- name: Run puppet using a specific tags
puppet:
tags:
- update
- nginx
- name: Run puppet agent in noop mode
puppet:
noop: yes
- name: Run a manifest with debug, log to both syslog and stdout, specify module path
puppet:
modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
logdest: all
manifest: /var/lib/example/puppet_step_config.pp
Status
- This module is guaranteed to have no backward incompatible interface changes going forward. [stableinterface]
- This module is maintained by the Ansible Community. [community]
Authors
- Monty Taylor (@emonty)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/puppet_module.html