User Tools

Site Tools


puppet

This is an old revision of the document!


Puppet (data center automation and configuration management framework)

Puppet YUM Repository

| /etc/yum.repos.d/puppet-el.repo
[Puppet_EL_Repo]
name=Puppet Enterprise Linux
baseurl=http://yum.puppetlabs.com/el/6/products/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-Key-Puppet
 
[Puppet_EL_dependancies]
name=Puppet Enterprise Dependencies
baseurl=http://yum.puppetlabs.com/el/6/dependencies/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-Key-Puppet

Get key file using following command

wget -O /etc/pki/rpm-gpg/RPM-GPG-Key-Puppet "http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"

Purgin Puppet report

In order to purge report i use this line in my cron or logrotate.

cd /var/lib/puppet/reports && find . -type f -name \*.yaml -mtime +12 -print0 | xargs -0 -n50 /bin/rm -f

Which purges all log older then 12 days.

Variables in node / site maniefest

$testdomain = $domain
$testsub = split($testdomain, '[.]')
$dr = $testsub[1]

Checking Hiera Value

Trying to lookup vhostip value Using puppet command

puppet apply --environment=test -e "notice(hiera(vhostip))"

Using hiera command

hiera -c /opt/puppet/hiera.yaml vhostip environment=test

checking syntax on template

puppet.1467908402.txt.gz · Last modified: 2020/08/10 02:29 (external edit)