git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/site/profile/files/puppetmaster
diff options
context:
space:
mode:
Diffstat (limited to 'site/profile/files/puppetmaster')
-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"
span class='insertions'>+5 | * | Update config_version to use a script that does not require gitNick Walker 2015-08-033-1/+25 | * | Remove hiera.yaml and instead manage it with puppet codeNick Walker 2015-08-033-9/+19 | * | Update environment.confNick Walker 2015-06-261-1/+1 | * | Update PuppetfileNick Walker 2015-06-261-0/+4 | * | Remove purgedirsNick Walker 2015-06-251-1/+0 | * | Add a site directory with example role and profile moduleNick Walker 2015-05-273-0/+19 | * | add site to modulepath in environment.confNick Walker 2015-05-271-1/+1 | * | Update README.mdNick Walker 2015-05-261-0/+6 | * | Update README.mdNick Walker 2015-05-151-1/+1 | * | Update PuppetfileNick Walker 2015-05-151-2/+7 | * | Rename defaults.yaml to common.yamlNick Walker 2015-05-151-0/+0 | * | Update hiera.yamlNick Walker 2015-05-151-5/+1 | * | Update configure_r10k.pp for PE3.8Nick Walker 2015-05-151-4/+3 | * | Update hiera.yamlNick Walker 2015-05-141-2/+1 | * | Update site.pp to work OOTBNick Walker 2015-05-111-1/+1 | * | Update README.mdNick Walker 2015-01-141-1/+3 | * | Update README.mdNick Walker 2015-01-141-1/+2 | * | Add stdlib to Puppetfile