puppet - Runs puppet

New in version 2.0.

Synopsis

  • Runs puppet agent or apply in a reliable manner

Requirements (on host that executes module)

  • puppet

Options

parameter required default choices comments
certname
(added in 2.1)
no None
The name to use when handling certificates.
environment
no None
Puppet environment to be used.
execute
(added in 2.1)
no None
Execute a specific piece of Puppet code. It has no effect with a puppetmaster.
facter_basename
no ansible
Basename of the facter output file
facts
no None
A dict of values to pass in as persistent external facter facts
logdest
(added in 2.1)
no stdout
  • stdout
  • syslog
Where the puppet logs should go, if puppet apply is being used
manifest
no None
Path to the manifest file to run puppet apply on.
modulepath
(added in 2.4)
no None
Path to an alternate location for puppet modules
puppetmaster
no None
The hostname of the puppetmaster to contact.
tags
(added in 2.1)
no None
A comma-separated list of puppet tags to be used.
timeout
no 30m
How long to wait for puppet to finish.

Examples

# Run puppet agent and fail if anything goes wrong
- puppet

# Run puppet and timeout in 5 minutes
- puppet:
    timeout: 5m

# Run puppet using a different environment
- puppet:
    environment: testing

# Run puppet using a specific certname
- puppet:
    certname: agent01.example.com

# Run puppet using a specific piece of Puppet code. Has no effect with a
# puppetmaster.
- puppet:
    execute: 'include ::mymodule'

# Run puppet using a specific tags
- puppet:
    tags: update,nginx

Status

This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/puppet_module.html