]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - scripts/arch_install_script.sh
Move scripts to separate chunks
[perso/Immae/Projets/Puppet.git] / scripts / arch_install_script.sh
diff --git a/scripts/arch_install_script.sh b/scripts/arch_install_script.sh
new file mode 100755 (executable)
index 0000000..21e202f
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+git_branch="$1"
+environment="$2"
+CODE_PATH="/etc/puppetlabs/code"
+
+rm -rf $CODE_PATH
+
+git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH
+puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
+# The password seed requires puppet to be run twice
+puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
+