- add certmanager script and config.yaml file - install into pyenv for certmanager - deploy to puppet-masters only
67 lines
2.2 KiB
Puppet
67 lines
2.2 KiB
Puppet
# Class: profiles::puppet::puppetmaster
|
|
#
|
|
# This class manages the puppetmaster using the ghoneycutt-puppet module.
|
|
# It manages the server settings in the puppet.conf file.
|
|
#
|
|
# Parameters: None
|
|
#
|
|
# Actions:
|
|
# - Sets up the server, main, agent, and master sections in the puppet.conf file
|
|
#
|
|
# Usage:
|
|
# Directly include the class in your node definitions or classify your nodes
|
|
# using an ENC or Hiera.
|
|
# Example:
|
|
# node 'puppet.example.com' {
|
|
# include profiles::puppet::puppetmaster
|
|
# }
|
|
#
|
|
# Requirements:
|
|
# - The 'ghoneycutt/puppet' module should be installed in your Puppet master.
|
|
# - Puppet master must have access to the necessary directories.
|
|
#
|
|
# Limitations:
|
|
# This is designed to work on Unix-like systems.
|
|
class profiles::puppet::puppetmaster (
|
|
String $puppetdb_host = lookup('profiles::puppet::puppetdb::puppetdb_host'),
|
|
) {
|
|
include profiles::puppet::r10k
|
|
include profiles::puppet::g10k
|
|
include profiles::puppet::enc
|
|
include profiles::puppet::autosign
|
|
include profiles::puppet::gems
|
|
include profiles::helpers::certmanager
|
|
|
|
class { 'puppetdb::master::config':
|
|
puppetdb_server => $puppetdb_host,
|
|
manage_storeconfigs => false,
|
|
}
|
|
|
|
class { 'profiles::puppet::server':
|
|
vardir => '/opt/puppetlabs/server/data/puppetserver',
|
|
logdir => '/var/log/puppetlabs/puppetserver',
|
|
rundir => '/var/run/puppetlabs/puppetserver',
|
|
pidfile => '/var/run/puppetlabs/puppetserver/puppetserver.pid',
|
|
codedir => '/etc/puppetlabs/code',
|
|
dns_alt_names => [
|
|
'prodinf01n01.main.unkin.net',
|
|
'puppet.main.unkin.net',
|
|
'puppetca.main.unkin.net',
|
|
'puppetmaster.main.unkin.net',
|
|
'puppet',
|
|
'puppetca',
|
|
'puppetmaster',
|
|
],
|
|
server => 'prodinf01n01.main.unkin.net',
|
|
node_terminus => 'exec',
|
|
external_nodes => '/opt/puppetlabs/bin/enc',
|
|
autosign => '/etc/puppetlabs/puppet/autosign.conf',
|
|
default_manifest => '/etc/puppetlabs/code/environments/develop/manifests',
|
|
default_environment => 'develop',
|
|
storeconfigs => true,
|
|
storeconfigs_backend => 'puppetdb',
|
|
reports => 'puppetdb',
|
|
usecacheonfailure => false,
|
|
}
|
|
}
|