92f8d2d251
This entailed configring the classifier to never sync on a schedule. Changing environment_timeout to unlimited for all masters. Setting a postrun command for r10k that would update the class information in the classifier (the update-classes endpoint).
12 lines
553 B
Bash
12 lines
553 B
Bash
#https://docs.puppetlabs.com/pe/latest/nc_update_classes.html#post-v1update-classes
|
|
|
|
CONFDIR=$(puppet master --configprint confdir)
|
|
|
|
CERT=$(puppet master --confdir ${CONFDIR} --configprint hostcert)
|
|
CACERT=$(puppet master --confdir ${CONFDIR} --configprint localcacert)
|
|
PRVKEY=$(puppet master --confdir ${CONFDIR} --configprint hostprivkey)
|
|
OPTIONS="--cert ${CERT} --cacert ${CACERT} --key ${PRVKEY}"
|
|
CONSOLE=$(awk '/server =/{print $NF}' ${CONFDIR}/console.conf)
|
|
|
|
curl -k -X POST ${OPTIONS} "https://${CONSOLE}:4433/classifier-api/v1/update-classes"
|