git clone https://github.com/indeedops/puppetscripts.git
python puppet-scripts/setup.py install
Configuration can live in two locations (in order)
- $HOME/..conf
- /etc/puppet-scripts/.conf
{
"hosts":["https://elastic.example.com"],
"port":443,
"index_pattern":"%Y.%m.%d",
"lookback":7
"username":"admin"
"password":"password1"
}
- puppet-disof
- puppet-show
Or: Did I Succeed Or Fail. A selection of nodes are sent through standard in and a summary of whether the runs succeeded or failed are sent back along with the logs of the failing nodes. The tool accepts three arguments:
- --verbose
- --summary: only print out the summary of the runs and no log output
- --resource: check if a particular resource failed
- --only-failed: Only print the failed nodes, not the successes
The puppet-show script queries Elasticsearch. It can show different Puppet application failures or catalog compilation failures in the environment.
We set a config version for our environments using a shell script specified in the environment.conf
config_version = /var/lib/puppet/bin/puppet_version.sh $environment /path/to/$environment/
manifest = /var/local/puppet-working-copies/$environment/manifests/site.pp
modulepath = /var/local/puppet-working-copies/$environment/modules:/var/local/puppet-working-copies/$environment/indeed/modules
puppet_version.sh $environment /path/to/$environment