Looks like you got some good responses on your Ask question... All good now?
On Tuesday, December 16, 2014 3:22:26 PM UTC-8, red wrote: > > I guess I really don't need to list the nodes. I just wanted to try out > the PE3.7 rest api. What I really need to be able to do is add > nodegroups. I had been using the console rake api for this, but the > console rake api is to be depreciated. I put the details of what I have > tried, and what goes wrong here: > > > http://ask.puppetlabs.com/question/15040/need-help-understand-pe-37-rest-api/ > > I'd really appreciate it if someone could help me out :) > > On Tue, Dec 16, 2014 at 7:02 AM, Byron Miller <byr...@gmail.com> wrote: >> >> Looks like you're using puppetDB api to query your puppet master? >> >> try just >> >> puppetmaster:443/{environment}/nodes - environment being "production" or >> whatever the default env is. >> >> or if querying puppetdb try /v3 api endpoint instead of /v1 >> >> >> On Monday, December 15, 2014 11:41:17 PM UTC-6, red wrote: >>> >>> Hi, >>> >>> Hi, >>> >>> I am trying out the PE 3.7 Rest API and I am unfamiliar with curl. I >>> think I need to execute this ... >>> >>> # /usr/bin/curl -v -X GET \ >>> > --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \ >>> > --cert /etc/puppetlabs/puppet/ssl/certs/puppetmaster-1.example.com.pem >>> \ >>> > --key >>> > /etc/puppetlabs/puppet/ssl/private_keys/puppetmaster-1.example.com.pem >>> >>> > --insecure https://puppetmaster-1:443/v1/nodes >>> >>> ... but this results in this output : >>> >>> /usr/bin/curl -v -X GET --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem >>> --cert /etc/puppetlabs/puppet/ssl/certs/puppetmaster-1.example.com.pem >>> --key >>> /etc/puppetlabs/puppet/ssl/private_keys/puppetmaster-1.example.com.pem >>> --insecure https://puppetmaster-1:443/v2/nodes >>> * About to connect() to puppetmaster-1 port 443 (#0) >>> * Trying 10.29.120.143... connected >>> * Connected to puppetmaster-1 (10.29.120.143) port 443 (#0) >>> * Initializing NSS with certpath: sql:/etc/pki/nssdb >>> * warning: ignoring value of ssl.verifyhost >>> * skipping SSL peer certificate verification >>> * SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA >>> * Server certificate: >>> * subject: CN=puppetmaster-1.example.com >>> * start date: Dec 14 20:36:42 2014 GMT >>> * expire date: Dec 14 20:36:42 2019 GMT >>> * common name: puppetmaster-1.example.com >>> * issuer: CN=Puppet CA generated on puppetmaster-1.example.com >>> at 2014-12-15 12:... >>> > GET /v2/nodes HTTP/1.1 >>> > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 >>> NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 >>> > Host: puppetmaster-1 >>> > Accept: */* >>> > >>> < HTTP/1.1 303 See Other >>> < Date: Mon, 15 Dec 2014 23:08:41 GMT >>> < Server: Jetty(9.1.z-SNAPSHOT) >>> < Location: /auth/login?redirect=%2Fv2%2Fnodes >>> < Content-Length: 0 >>> < Connection: close >>> < >>> * Closing connection #0 >>> >>> But no node list! I only have one node, my puppetmaster. What am I >>> doing wrong? >>> >>> Thanks >>> >> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3f3a4dee-74c1-450a-9bf3-44f06e20c641%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.