]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/files/cronie/puppet-post-merge
Refactor base installation module
[perso/Immae/Projets/Puppet.git] / modules / base_installation / files / cronie / puppet-post-merge
diff --git a/modules/base_installation/files/cronie/puppet-post-merge b/modules/base_installation/files/cronie/puppet-post-merge
new file mode 100644 (file)
index 0000000..ac5e3ff
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+## Run Puppet locally using puppet apply
+git submodule update --init
+/usr/bin/puppet apply `pwd`/manifests/site.pp
+
+## Log status of the Puppet run
+if [ $? -eq 0 ]
+then
+    /usr/bin/logger -i "Puppet has run successfully" -t "puppet-run"
+    exit 0
+else
+    /usr/bin/logger -i "Puppet has ran into an error, please run Puppet manually" -t "puppet-run"
+    exit 1
+fi
+