summaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-10-27 20:33:50 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-10-27 20:33:50 -0200
commit5ea721057b08375cc38f7435148de650512782d2 (patch)
tree7a839db3175458f7c50f9011bfe066e84b7c4c7d /share/hydractl
parent8ce59f0975b03d881913747ecc4c7c9dcacc337b (diff)
downloadhydra-5ea721057b08375cc38f7435148de650512782d2.tar.gz
hydra-5ea721057b08375cc38f7435148de650512782d2.tar.bz2
Bootstrap: support for stage argument
Diffstat (limited to 'share/hydractl')
-rwxr-xr-xshare/hydractl/bootstrap20
1 files 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
# <http://www.gnu.org/licenses/>.
-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