Created
February 19, 2016 00:07
-
-
Save acidprime/5450d9eefbf3f1d0512f to your computer and use it in GitHub Desktop.
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
#!/opt/puppetlabs/puppet/bin/ruby | |
require 'net/http' | |
require 'json' | |
require 'yaml' | |
# Currently do not have this working with client side SSL, perhaps someone can help with that in the comments. | |
host = 'localhost' | |
port = '8080' | |
http = Net::HTTP.new(host, port) | |
resources_uri = '/pdb/query/v4/resources/User' | |
puts JSON.parse(http.get(resources_uri).body).to_yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment