summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hydra/config15
-rwxr-xr-xshare/hydra/init2
-rwxr-xr-xshare/hydractl/bootstrap6
3 files changed, 17 insertions, 6 deletions
diff --git a/lib/hydra/config b/lib/hydra/config
index 3cd7cc7..8dbda89 100644
--- a/lib/hydra/config
+++ b/lib/hydra/config
@@ -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
+ )
+}
diff --git a/share/hydra/init b/share/hydra/init
index 46c2de6..d21c003 100755
--- a/share/hydra/init
+++ b/share/hydra/init
@@ -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
diff --git a/share/hydractl/bootstrap b/share/hydractl/bootstrap
index c83a4b0..735908c 100755
--- a/share/hydractl/bootstrap
+++ b/share/hydractl/bootstrap
@@ -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