ansible.builtin.puppet (v2.7.7) — module

Runs puppet

| "added in version" 2.0 of ansible.builtin"

Authors: Monty Taylor (@emonty)

stableinterface | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.7

Description

Runs I(puppet) agent or apply in a reliable manner.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet agent and fail if anything goes wrong
  puppet:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet and timeout in 5 minutes
  puppet:
    timeout: 5m
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet using a different environment
  puppet:
    environment: testing
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet using a specific certname
  puppet:
    certname: agent01.example.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet using a specific piece of Puppet code. Has no effect with a puppetmaster
  puppet:
    execute: include ::mymodule
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run puppet using a specific tags
  puppet:
    tags: update,nginx
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
tags:
    description:
    - A comma-separated list of puppet tags to be used.
    version_added: '2.1'
    version_added_collection: ansible.builtin

debug:
    description:
    - Enable full debugging
    version_added: '2.7'
    version_added_collection: ansible.builtin

facts:
    description:
    - A dict of values to pass in as persistent external facter facts.

execute:
    description:
    - Execute a specific piece of Puppet code.
    - It has no effect with a puppetmaster.
    version_added: '2.1'
    version_added_collection: ansible.builtin

logdest:
    choices:
    - stdout
    - syslog
    - all
    default: stdout
    description: 'Where the puppet logs should go, if puppet apply is being used. C(all)

      will go to both C(stdout) and C(syslog).

      '
    version_added: '2.1'
    version_added_collection: ansible.builtin

timeout:
    default: 30m
    description:
    - How long to wait for I(puppet) to finish.

verbose:
    description:
    - Print extra information
    version_added: '2.7'
    version_added_collection: ansible.builtin

certname:
    description:
    - The name to use when handling certificates.
    version_added: '2.1'
    version_added_collection: ansible.builtin

manifest:
    description:
    - Path to the manifest file to run puppet apply on.

summarize:
    description:
    - Whether to print a transaction summary
    version_added: '2.7'
    version_added_collection: ansible.builtin

modulepath:
    description:
    - Path to an alternate location for puppet modules.
    version_added: '2.4'
    version_added_collection: ansible.builtin

environment:
    description:
    - Puppet environment to be used.

puppetmaster:
    description:
    - The hostname of the puppetmaster to contact.

facter_basename:
    default: ansible
    description:
    - Basename of the facter output file.