Forge Home

puppetconf

This puppet module to manage puppet.conf

32,264 downloads

30,416 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.7 (latest)
  • 0.2.6
  • 0.2.5
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
released Mar 3rd 2016
This version is compatible with:
  • Any OS that runs Puppet Agent

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'cjtoolseram-puppetconf', '0.2.7'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add cjtoolseram-puppetconf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install cjtoolseram-puppetconf --version 0.2.7

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

cjtoolseram/puppetconf — version 0.2.7 Mar 3rd 2016

puppetconf

Table of Contents

  1. Description
  2. Easy Setup
  3. Usage
  4. Reference
  5. Variables
  6. Limitations
  7. Development

Description

This module is use to managed all your puppet.conf

NOTE: This module does not install agent!

Easy Setup

For Master of Master Puppet.conf configuration

class { 'puppetconf::baseconf::mom':
}

For Compile Master Puppet.conf configuration

class { 'puppetconf::baseconf::cm':
  master   => 'mom.puppetdebug.vlan',
  caserver => 'mom.puppetdebug.vlan',
}

For Agents Puppet.conf configuration

class { 'puppetconf::baseconf::agent':
  master   => 'mom.puppetdebug.vlan',
  caserver => 'mom.puppetdebug.vlan',
}

Usage

There are 3 define types which are meant for the sections in puppet.conf

  • [main]
  • [master]
  • [agent]

section [main]

puppetconf::main { 'runinterval':
  value     => '1h',
}

section [master]

puppetconf::main { 'environment_timeout':
  value     => '0',
}

section [agent]

puppetconf::main { 'certname':
  value     => 'agent.puppetdebug.vlan',
}

Each of the above define types will require a default path to configuration file. Therefore, would suggest to add defaults or params for them. Examples as below:

$conf_path = '/etc/puppetlabs/puppet/puppet.conf'

Puppetconf::Main {
  conf_path => $conf_path,
}

Puppetconf::Master {
  conf_path => $conf_path,
}

Puppetconf::Agent {
  conf_path => $conf_path,
}

Please refer to the Config Directory for more details.

There are also base classes with specific set of configuration. You can just include them in your classifier.

Master of Master:

class { 'puppetconf::baseconf::mom':
}

Compile Master:

class { 'puppetconf::baseconf::cm':
  master   => 'mom.puppetdebug.vlan',
  caserver => 'mom.puppetdebug.vlan',
}

Agent:

class { 'puppetconf::baseconf::agent':
  master   => 'mom.puppetdebug.vlan',
  caserver => 'mom.puppetdebug.vlan',
}

You can extend the classes by writing a wrapper module. E.g.

class wrapper {
  class { 'puppetconf::baseconf::agent':
    master   => 'mom.puppetdebug.vlan',
    caserver => 'mom.puppetdebug.vlan',
  }

  puppetconf::main { 'environment_timeout':
    value     => '180',
  }
}

This will add environment_timeout = 180 to the main section of this config.

Reference

Base output of puppet.conf from the predefined base classes.

Master of Master:

[main]
certname = pe-201531-master.puppetdebug.vlan
server = pe-201531-master.puppetdebug.vlan
user  = pe-puppet
group = pe-puppet
archive_files = true
archive_file_server = pe-201531-master.puppetdebug.vlan
module_groups = base+pe_only
environmentpath = /etc/puppetlabs/code/environments
ca_server = pe-201531-master.puppetdebug.vlan

[agent]
graph = true

[master]
app_management = true
node_terminus = classifier
storeconfigs = true
storeconfigs_backend = puppetdb
reports = puppetdb
certname = pe-201531-master.puppetdebug.vlan
always_cache_features = true

Compile Master:

[main]
server = mom.puppetdebug.vlan
module_groups = base+pe_only
environmentpath = /etc/puppetlabs/code/environments
user = pe-puppet
group = pe-puppet
ca_server = mom.puppetdebug.vlan
[agent]
certname = cm.puppetdebug.vlan

[master]
app_management = true
node_terminus = classifier
storeconfigs = true
storeconfigs_backend = puppetdb
reports = puppetdb
certname = cm.puppetdebug.vlan
always_cache_features = true
ca = false

Agent:

[main]
server = mom.puppetdebug.vlan
ca_server = mom.puppetdebug.vlan

[agent]
certname = agent.puppetdebug.vlan

Variables

Below are the list of default value in each predefined class:

Class puppetconf::baseconf::mom:

Class puppetconf::baseconf::cm:

Class puppetconf::baseconf::agent:

The above variables have the same name as Puppetlabs configuration attributes. The only exceptions are:

You may also visit the Configuration Reference for further reference.

Limitations

This module will only manage puppet.conf file but will not do any installation on the agent. Any configuration not under a section will not be modified or removed. This also applies to comments!

Development

Feel free to hack around and pull request to add any improvement. Don't be shy!