community.general.puppet – Runs puppet
Note
This plugin is part of the community.general collection (version 3.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.puppet
.
Parameters
Parameter |
Comments |
---|---|
The name to use when handling certificates. |
|
Enable full debugging. Choices:
|
|
Puppet environment to be used. |
|
Execute a specific piece of Puppet code. It has no effect with a puppetmaster. |
|
Basename of the facter output file. Default: “ansible” |
|
A dict of values to pass in as persistent external facter facts. |
|
Where the puppet logs should go, if puppet apply is being used.
Choices:
|
|
Path to the manifest file to run puppet apply on. |
|
Path to an alternate location for puppet modules. |
|
Override puppet.conf noop mode. When When When unset (default), use default or puppet.conf value if defined. Choices:
|
|
The hostname of the puppetmaster to contact. |
|
Whether to print a transaction summary. Choices:
|
|
A list of puppet tags to be used. |
|
How long to wait for puppet to finish. Default: “30m” |
|
Toggles use_srv_records flag Choices:
|
|
Print extra information. Choices:
|
Examples
- name: Run puppet agent and fail if anything goes wrong
community.general.puppet:
- name: Run puppet and timeout in 5 minutes
community.general.puppet:
timeout: 5m
- name: Run puppet using a different environment
community.general.puppet:
environment: testing
- name: Run puppet using a specific certname
community.general.puppet:
certname: agent01.example.com
- name: Run puppet using a specific piece of Puppet code. Has no effect with a puppetmaster
community.general.puppet:
execute: include ::mymodule
- name: Run puppet using a specific tags
community.general.puppet:
tags:
- update
- nginx
- name: Run puppet agent in noop mode
community.general.puppet:
noop: yes
- name: Run a manifest with debug, log to both syslog and console, specify module path
community.general.puppet:
modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
logdest: all
manifest: /var/lib/example/puppet_step_config.pp
Authors
Monty Taylor (@emonty)