Puppet – Identifying dead puppet code using puppet ghostbuster

This is a how-to guide on using: First get this working so that you can access this gui dashboard: Install rvm: $ gpg –keyserver hkp:// –recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ \curl -sSL | bash -s stable –ruby Check rvm install is successful: schowdhury@Shers-MacBook-Pro:~$ rvm –version rvm 1.29.3 (latest) […]

Read More

Puppet – External Facts

External facts is a great way to attach (arbitrary) metadata to a machine during the the launch of a new machine. E.g. when building a Centos 7 aws ec2 instance, you can generate the external facts via userdata. Puppet can use these external facts in the way as any other […]

Read More

Puppet – querying puppetdb with postgres command line (psql)

Exported Resources querying puppetdb with postgres command line, psql psql -h localhost -U puppetdb puppetdb However to connect to puppet enterprise’s puppetdb, then follow: \q \h \l \d select * FROM catalog_resources \X \x SELECT * FROM catalog_resourcesSELECT * FROM factsselect * from factsssselect * from reports […]

Read More

Puppet – r10k and the Puppetfile

The “Puppetfile” is list of all puppet modules you want downloaded into your puppet master’s modules folder: The first line of this file should be: forge “” After that any puppet forge modules are listed as: mod ‘puppetlabs/stdlib’, ‘4.5.1’ Next any puppet modules hosted on git (e.g. github or any […]

Read More

Puppet – Ordering your classes

this is common, for example, sometimes once class installs dbg software, and then the next class creates the db istself. class mainclass { include class1 include class2 include class3 include class4 Class[‘class1’] -> Class[‘class2’] -> Class[‘class3’] -> Class[‘class4’] }

Read More