From 5ea721057b08375cc38f7435148de650512782d2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 27 Oct 2013 20:33:50 -0200 Subject: Bootstrap: support for stage argument --- share/hydractl/bootstrap | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/share/hydractl/bootstrap b/share/hydractl/bootstrap index a1ca8a1..6658e4e 100755 --- a/share/hydractl/bootstrap +++ b/share/hydractl/bootstrap @@ -16,13 +16,19 @@ # License along with this program. If not, see # . -hydractl puppet-install +STAGE="$1" -mkdir -p /etc/puppet/modules -git clone git://git.sarava.org/puppet-bootstrap /etc/puppet/modules/bootstrap +if [ "$STAGE" == "repository" ]; then + hydractl puppet-install -echo "Editing /etc/puppet/modules/bootstrap/manifests/config.pp to suit your needs..." -$EDITOR /etc/puppet/modules/bootstrap/manifests/config.pp + mkdir -p /etc/puppet/modules + git clone git://git.sarava.org/puppet-bootstrap /etc/puppet/modules/bootstrap -puppet agent --no-daemonize --debug --verbose --onetime /etc/puppet/modules/bootstrap/manifests/init.pp -puppet agent --no-daemonize --debug --verbose + echo "Editing /etc/puppet/modules/bootstrap/manifests/config.pp to suit your needs..." + $EDITOR /etc/puppet/modules/bootstrap/manifests/config.pp +fi + +if [ -e "/etc/puppet/modules/bootstrap/manifests/$stage.pp" ]; then + puppet agent --no-daemonize --debug --verbose --onetime /etc/puppet/modules/bootstrap/manifests/$stage.pp + puppet agent --no-daemonize --debug --verbose +fi -- cgit v1.2.3