Skip to content

Instantly share code, notes, and snippets.

@jessereynolds
Last active April 8, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessereynolds/e5f070aa5bd5987c30a32d5eacecf692 to your computer and use it in GitHub Desktop.
Save jessereynolds/e5f070aa5bd5987c30a32d5eacecf692 to your computer and use it in GitHub Desktop.
Puppet etc Useful Commands and Resources

Puppet etc Useful Commands and Resources

Puppet Enterprise APIs

Gary's PE Curl Commands Repo: https://github.com/glarizza/pe_curl_requests

Testing Control Repos

Example control repo with automated tests for syntax, style (puppet-lint), and onceover (compilation of all roles defined in the puppet code by dynamic generation of rspec-puppet examples) with CI/CD pipelines configured in GitLab, Travis-CI and Azure DevOps: https://github.com/jessereynolds/control-repo-fbz

OpenSSL

Check if a certificate matches a private key by obtaining the modulus of each:

openssl x509 -noout -modulus -in puppet.example.com.cert.pem
openssl rsa -noout -modulus -in puppet.example.com.private_key.pem
#
# or optionally pipe the modulus through md5 to obtain a shorter string to compare

rspec-puppet - enable puppet output when troubleshooting tests

Add this to spec_helper.rb:

  Puppet::Util::Log.level = :debug
  Puppet::Util::Log.newdestination(:console)

Maybe there's a nicer convention / mechanism out there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment