Skip to content

Instantly share code, notes, and snippets.

@juxtin
Created August 18, 2017 23:11
Show Gist options
  • Save juxtin/2bacaedf9bb0ded3286a2e5f346fb28b to your computer and use it in GitHub Desktop.
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
#!/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