User Tools

Site Tools


puppet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

puppet [2016/07/07 16:20]
k2patel [checking syntax on template]
puppet [2020/08/10 02:35]
Line 1: Line 1:
-====== Puppet (data center automation and configuration management framework) ====== 
  
-==== Puppet YUM Repository ==== 
-<code bash | /​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 
-</​code>​ 
- 
-=== Get key file using following command === 
-<code bash> 
-wget -O /​etc/​pki/​rpm-gpg/​RPM-GPG-Key-Puppet "​http://​yum.puppetlabs.com/​RPM-GPG-KEY-puppetlabs"​ 
-</​code>​ 
- 
-==== Purgin Puppet report ==== 
-In order to purge report i use this line in my cron or logrotate. 
-<code bash> 
-cd /​var/​lib/​puppet/​reports && find . -type f -name \*.yaml -mtime +12 -print0 | xargs -0 -n50 /bin/rm -f 
-</​code>​ 
- 
-Which purges all log older then 12 days. 
- 
-==== Variables in node / site maniefest ==== 
- 
-<code ruby> 
-$testdomain = $domain 
-$testsub = split($testdomain,​ '​[.]'​) 
-$dr = $testsub[1] 
-</​code>​ 
- 
- 
-==== Checking Hiera Value ==== 
-**Trying to lookup vhostip value** 
-Using puppet command ​ 
- 
-<code bash> 
-puppet apply --environment=test -e "​notice(hiera(vhostip))"​ 
-</​code>​ 
- 
-Using hiera command 
-<code bash> 
-hiera -c /​opt/​puppet/​hiera.yaml vhostip environment=test 
-</​code>​ 
- 
-==== checking syntax on template ==== 
-<code rbuy> 
-erb -P -x -T '​-'​ mytemplate.erb | ruby -c 
-</​code>​ 
- 
-[[ https://​docs.puppet.com/​puppet/​latest/​reference/​lang_template.html#​referencing-variables | Variable Referencing ]] 
- 
-[[ https://​docs.puppet.com/​puppet/​latest/​reference/​function.html | Function Reference ]] 
- 
-[[ https://​groups.google.com/​group/​puppet-users/​browse_thread/​thread/​e56e0f678a134089 | Incremental Number ]] 
puppet.txt ยท Last modified: 2020/08/10 02:35 (external edit)