aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-01 11:33:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-01 11:33:12 -0200
commitb5a0796573e3fed798f257b09391b0e51fbb28e3 (patch)
treee4bc0230a4c0eb5bd9cc4c6f55623f92e606295e
parentc23be46b6e346ddcfea85f8e147e540bd700153d (diff)
downloadpuppet-bootstrap-b5a0796573e3fed798f257b09391b0e51fbb28e3.tar.gz
puppet-bootstrap-b5a0796573e3fed798f257b09391b0e51fbb28e3.tar.bz2
Puppetfile support
-rwxr-xr-xbin/dependencies2
-rwxr-xr-xbin/deploy9
2 files changed, 10 insertions, 1 deletions
diff --git a/bin/dependencies b/bin/dependencies
index 4330730..3a47a8e 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -5,7 +5,7 @@
# Parameters
BASENAME="`basename $0`"
-DEPLOY_DEPENDENCIES="rsync puppet-common hiera-eyaml"
+DEPLOY_DEPENDENCIES="rsync puppet-common hiera-eyaml r10k"
DEVELOP_DEPENDENCIES="git mr whois hiera-eyaml"
# Additional wheezy dependencies if not using puppet-common from wheezy-backports
diff --git a/bin/deploy b/bin/deploy
index 22065dc..3680129 100755
--- a/bin/deploy
+++ b/bin/deploy
@@ -57,6 +57,15 @@ if [ -d "$BASEDIR/puppet/files/patches/$DIST" ]; then
)
fi
+# Check for Puppetfile
+if [ -e "$BASEDIR/Puppetfile" ]; then
+ if which r10k &> /dev/null; then
+ ( cd $BASEDIR && $SUDO r10k puppetfile install -v )
+ elif which librarian-puppet &> /dev/null; then
+ ( cd $BASEDIR && $SUDO librarian-puppet install )
+ fi
+fi
+
# Run puppet apply
PUPPET_OPTS="--confdir=$BASEDIR --modulepath=$BASEDIR/modules"
LC_ALL=C $SUDO puppet apply $PUPPET_OPTS $PUPPET_MANIFEST