]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Puppetfile support
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 1 Nov 2017 13:33:12 +0000 (11:33 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 1 Nov 2017 13:33:12 +0000 (11:33 -0200)
bin/dependencies
bin/deploy

index 43307300cc5173bfebb9ad1c6ebcca0309440f94..3a47a8e6962c9f530be56cfd0343e822b48bcaf3 100755 (executable)
@@ -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
index 22065dce5c2ab31d75af7d9aaa1144b819ca7361..368012926b83d8cd6b95bc70a63965b09b6dc43a 100755 (executable)
@@ -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