]> gitweb.fluxo.info Git - hydra.git/commitdiff
New function hydra_bootstrap_config
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Mar 2014 18:20:31 +0000 (15:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Mar 2014 18:20:31 +0000 (15:20 -0300)
lib/hydra/config
share/hydra/init
share/hydractl/bootstrap

index 3cd7cc78ec0e8c89a9adc8123d4b33265f1b7f33..8dbda891604a6755aaea1d4e3faa22eb695373d4 100644 (file)
@@ -67,3 +67,18 @@ function hydra_config {
     exit 1
   fi
 }
+
+# Configure puppet-boostrap.
+function hydra_bootstrap_config {
+  local config="$1"
+
+  if [ -z "$config" ] || [ ! -d "$config" ]; then
+    return
+  fi
+
+  (
+    cd $config
+    make submodules
+    make config
+  )
+}
index 46c2de6358241fc9a4efb59b5fb58db6a9af401c..d21c003ab868c18b900c4a6000f73540cd09d882 100755 (executable)
@@ -76,7 +76,7 @@ else
 
   # Config puppet
   echo "Configuring puppet repository..."
-  ( cd $BASEDIR/puppet && make submodules && make config )
+  hydra_bootstrap_config $BASEDIR/puppet
 fi
 
 cat<<-EOF
index c83a4b00b7cb66155295cd9b66c7dcd20660f3fd..735908c896693c8d163e0a89ea598d681697341f 100755 (executable)
@@ -23,11 +23,7 @@ if [ "$STAGE" == "repository" ]; then
 
   rm -rf /etc/puppet && git clone git://git.sarava.org/puppet-bootstrap /etc/puppet
   chown -R puppet. /etc/puppet
-
-  echo "Please edit /etc/puppet/manifests/config.pp to suit your needs..."
-  echo "Press any key to continue, Ctrl-C to abort..."
-  read option
-  $EDITOR /etc/puppet/modules/bootstrap/manifests/config.pp
+  hydra_bootstrap_config /etc/puppet
 fi
 
 if [ -e "/etc/puppet/modules/bootstrap/manifests/$stage.pp" ]; then