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
+ )
+}
# Config puppet
echo "Configuring puppet repository..."
- ( cd $BASEDIR/puppet && make submodules && make config )
+ hydra_bootstrap_config $BASEDIR/puppet
fi
cat<<-EOF
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