]> gitweb.fluxo.info Git - hydra.git/commitdiff
Bootstrap: support for stage argument
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 27 Oct 2013 22:33:50 +0000 (20:33 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 27 Oct 2013 22:33:50 +0000 (20:33 -0200)
share/hydractl/bootstrap

index a1ca8a114ce3a51aa502ec599f795944948415e6..6658e4e33dde3412e0d5796244b5953353585b59 100755 (executable)
 # 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