Hello,

I have the following REST skript:

#!/bin/sh

HOST=$HOSTNAME
STRING='{"name":"HOST","values":{"architecture":"x86_64"}}'
STRING=${STRING/HOST/$HOST}
echo "STRING: $STRING"
URL_ENCODE=$(echo -n $STRING |  jq -sRr @uri)

curl --cert /etc/puppetlabs/puppet/ssl/certs/${HOST}.pem \
 --key /etc/puppetlabs/puppet/ssl/private_keys/${HOST}.pem \
 --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \
 -X GET 
"https://puppet:8140/puppet/v3/catalog/$HOST?environment=production&facts_format=application/json&facts=${URL_ENCODE}&transaction_uuid=1234567890
 
 "


I'm interested in getting the catalog version, as printed by:

puppet/lib/ruby/vendor_ruby/puppet/transaction.rb

Puppet.info _("Applying configuration version '%{version}'") % { version: 
catalog.version } if catalog.version


The reason is, I like to compare the catalog version from the server with
the catalog version off the last run:

$ cat /opt/puppetlabs/puppet/public/last_run_summary.yaml | grep config
config: heads/devel-0-g1940ad41

This would allow me to speed things up in a hot path.

How can this be done?


best regards,

Martin

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/puppet-users/be320f27-eb41-41e8-bae5-babfc5995146n%40googlegroups.com.

Reply via email to