git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/site/profile/files
diff options
context:
space:
mode:
authormail_redacted_for_web 2015-11-25 16:51:43 +0000
committermail_redacted_for_web 2015-11-25 16:51:43 +0000
commit2859cffba989f4751d60ab0127e7ad5e7b65278a (patch)
treed74953d5f0595d1e1082dfece1f22e97111f7a51 /site/profile/files
parentc2bd0d3ca1fd4e9f2fce24196201835272fd1e21 (diff)
parent10732cf3700bce033091fc3d0e1e5d9bb643932d (diff)
downloadcontrol-repo-template-2859cffba989f4751d60ab0127e7ad5e7b65278a.tar.bz2
Merged from upstream
Diffstat (limited to 'site/profile/files')
-rw-r--r--site/profile/files/puppetmaster/update-classes.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/site/profile/files/puppetmaster/update-classes.sh b/site/profile/files/puppetmaster/update-classes.sh
new file mode 100644
index 0000000..fc33026
--- /dev/null
+++ b/site/profile/files/puppetmaster/update-classes.sh
@@ -0,0 +1,11 @@
+#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}/classifier.yaml)
+
+curl -k -X POST ${OPTIONS} "https://${CONSOLE}:4433/classifier-api/v1/update-classes"