]> gitweb.fluxo.info Git - hydra.git/commitdiff
Check if local manifest is available
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 8 Sep 2015 20:15:14 +0000 (17:15 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 8 Sep 2015 20:15:14 +0000 (17:15 -0300)
share/hydractl/deploy

index 450c92f5972ab199cb86e26295877ddfe8e2c295..d61519e6b565a1be9502f6904595e3296c40ae4d 100755 (executable)
 source $APP_BASE/lib/hydra/functions || exit 1
 hydra_config_load
 
+# Parameters
+MANIFEST="`facter fqdn`.pp"
+
 # Run puppet
-sudo puppet apply --confdir=$HYDRA_FOLDER/puppet \
-                  --modulepath=$HYDRA_FOLDER/modules $HYDRA_FOLDER/puppet/manifests/nodes/$(facter fqdn).pp
+if [ -e "$HYDRA_FOLDER/puppet/manifests/nodes/$MANIFEST" ]; then
+  sudo puppet apply --confdir=$HYDRA_FOLDER/puppet \
+                    --modulepath=$HYDRA_FOLDER/modules $HYDRA_FOLDER/puppet/manifests/nodes/$MANIFEST
+fi