Matthias Saou

thias

14,420 downloads

2,741 latest version

4.0 quality score

Version information

  • 1.0.2 (latest)
  • 1.0.1
  • 1.0.0
  • 0.6.3
  • 0.6.2
  • 0.6.1
  • 0.6.0
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.1
released Jun 6th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=2.7.20 <7.0.0
  • RedHat
    ,
    CentOS

Start using this module

Tags: puppet

Documentation

thias/puppet — version 1.0.2 Jun 6th 2019

puppet-puppet

Overview

Puppet module to solve the chicken and egg problem : Manage puppet masters and agents from puppet.

  • puppet::agent : Class to manage Puppet Agents.
  • puppet::master : Class to manage Puppet Masters.

Examples

Example puppet agent :

class { '::puppet::agent':
  forcenoop     => true,
  service       => false,
  cron_enable   => true,
  cron_silent   => true,
  puppet_server => 'puppet.example.com',
}

The noop related options are especially useful for small deployments where there is no testing environment but there is a Dashboard or similar, since no changes will be automatically made, but all pending changes will appear and be easy to review. The included repuppet script can then be run on nodes where changes are to be applied.

Example puppet master with Passenger, PuppetDB and sending reports to a local Dashboard (configured separately, see puppet::dashboard for a work in progress) :

class { '::puppet::master':
  runtype              => 'passenger',
  reports              => 'http',
  storeconfigs         => true,
  storeconfigs_backend => 'puppetdb',
}

When enabling the puppet::master class, the puppet::agent's main configuration is then changed to be puppetagent.conf, and both it and a puppetmaster.conf are automatically concatenated together as puppet.conf when either changes.

This is because it isn't trivial to use a different configuration for each.

Example puppet master with the default webrick service run and MySQL for stored configurations (configured separately) :

class { '::puppet::master':
  runtype      => 'service',
  certname     => 'puppet.example.com',
  storeconfigs => true,
  dbadapter    => 'mysql',
  dbserver     => 'localhost',
  dbname       => 'puppet',
  dbuser       => 'puppet',
  dbpassword   => 'password123',
  dbsocket     => '/var/lib/mysql/mysql.sock',
  extraopts    => {
    'masterlog' => '/var/log/puppet/puppetmaster.log',
    'autoflush' => 'true',
  },  
}

Note that by default the puppet::master class will require the thias/selinux module if you have SELinux enabled in order to add policy rules to make everything work. If you wish to manage the SELinux changes separately, set selinux => false.

Example puppet master with clojure puppetserver :

class { '::puppet::master':
  runtype              => 'puppetserver',
  certname             => 'puppet.example.com',
  dns_alt_names        => 'puppet.example.lan,puppet',
  reports              => 'http',
  storeconfigs         => 'true',
  storeconfigs_backend => 'puppetdb',
  rsyslog_file         => '/var/log/puppet/puppetmaster.log',
  extraopts            => {
    'environmentpath' => '$confdir/environments',
    'parser'          => 'future',
  },
}