Hello,
I need a faster way to get the current catalog version on the puppet server.
For example, the following script:
$ cat getcat.sh
#!/bin/sh
HOST=$HOSTNAME
curl -s --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 \
https://puppet:8140/puppet/v3/catalog/$HOST?environment=production
returns the complete catalog from the server. It takes around 4 secs.
I'm only interested in the version:
$ ./getcat.sh | jq .version
"heads/devel-0-ge66985f4"
Is it possible to enhance the REST API that I can get the information
faster,
eg instantly?
I'm checking if a puppet run is necessary, by comparing:
/opt/puppetlabs/puppet/public/last_run_summary.yaml
against the version on the server. For this I only need the version, not
everything else.
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/afb72ff8-3708-4218-98e1-e28ae5324649n%40googlegroups.com.