Created
August 18, 2017 23:11
-
-
Save juxtin/2bacaedf9bb0ded3286a2e5f346fb28b to your computer and use it in GitHub Desktop.
Perform a curl GET request to the given puppet server endpoint in PE
This file contains 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 | |
# example: | |
# ./puppetserver-get /puppet/v3/environments | |
FQDN=$(facter fqdn) | |
CERTS="/etc/puppetlabs/puppet/ssl/certs" | |
KEYS="/etc/puppetlabs/puppet/ssl/private_keys" | |
curl "https://${FQDN}:8140$1" \ | |
--cert "${CERTS}/${FQDN}.pem" \ | |
--key "${KEYS}/${FQDN}.pem" \ | |
--cacert "${CERTS}/ca.pem" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment