]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/files/scripts/puppet_reset_and_apply
Add helpers and remove logs from cronie
[perso/Immae/Projets/Puppet.git] / modules / base_installation / files / scripts / puppet_reset_and_apply
diff --git a/modules/base_installation/files/scripts/puppet_reset_and_apply b/modules/base_installation/files/scripts/puppet_reset_and_apply
new file mode 100644 (file)
index 0000000..ff71aa8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+cd /etc/puppetlabs/code
+git fetch origin
+
+branch="master"
+if [ -n "$1" ]; then
+  branch="$1"
+fi
+
+git reset --hard origin/$1
+
+git submodule update --init
+puppet apply --test manifests/site.pp