This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GIST_URL: https://gist.github.com/natemccurdy/65676368168708810c29 | |
# Get the list of classes that the Puppetserver knows about. | |
# https://docs.puppetlabs.com/puppet/latest/reference/http_api/http_environments.html | |
CERT="$(puppet agent --configprint hostcert)" | |
CACERT="$(puppet agent --configprint localcacert)" | |
PRVKEY="$(puppet agent --configprint hostprivkey)" | |
OPTIONS="--cert ${CERT} --cacert ${CACERT} --key ${PRVKEY}" | |
MASTER="$(puppet agent --configprint server)" |