# rpm -ivh
http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm# yum --enablerepo=puppetlabs-products,puppetlabs-deps -y install puppet-server
# yum install rubygems.noarch
# gem install r10k
# cat /etc/puppet.conf
# systemctl start puppet.service
# systemctl start puppetmaster.service
>>
[main]
dns_alt_names = puppet.adm
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
environmentpath='/etc/puppet/environments'
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
# cat /etc/r10k.yaml | egrep -v '^*#'
>>
:cachedir: '/var/cache/r10k'
:sources:
:base:
remote: '
https://puppet.ro:PASSWD_HERE@git.adm/infrastructure/infrastructure_env.git'
basedir: '/etc/puppet/environments'
:purgedirs:
- '/etc/puppet/environments'
# cat /etc/puppet/environments/production/Puppetfile
>>
mod 'bind',
:git => '
https://puppet.ro:PASSWORD_HERE@git.adm/infrastructure/bind.git',
:ref => 'production'
mod 'users',
:git => '
https://puppet.ro:PASSWORD_HERE@git.adm/infrastructure/users.git',
:ref => 'production'
mod 'pupply',
:git => '
https://puppet.ro:PASSWORD_HERE@git.adm/infrastructure/pupply.git',
:ref => 'production'
mod 'openvpn',
:git => '
https://puppet.ro:PASSWORD_HERE@git.adm/infrastructure/openvpn.git',
:ref => 'production'
mod 'custom_facter',
:git => '
https://puppet.ro:PASSWORD_HERE@git.adm/infrastructure/custom_facter.git',
:ref => 'production'
# cat /etc/hiera.yaml
>>
---
:hierarchy:
#- "%{::hosttype}/common"
#- "%{::fqdn}/common"
- "%{::hosttype}/common"
#- $hosttype/common
- common
:backends:
- yaml
:yaml:
:datadir: "/etc/puppet/environments/%{::environment}/hieradata"
# cat /etc/puppet/environments/production/manifests/globals.pp
>>
# Globals
hiera_include('classes')