aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-08 17:15:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-08 17:15:14 -0300
commit269bc45750ef5df18e9ea774397c0d1660660e0a (patch)
tree0173109babf49f1e95bda93956dd043552341625
parent6e446329869337f32dacae244269a6e5296fa91d (diff)
downloadhydra-269bc45750ef5df18e9ea774397c0d1660660e0a.tar.gz
hydra-269bc45750ef5df18e9ea774397c0d1660660e0a.tar.bz2
Check if local manifest is available
-rwxr-xr-xshare/hydractl/deploy9
1 files changed, 7 insertions, 2 deletions
diff --git a/share/hydractl/deploy b/share/hydractl/deploy
index 450c92f..d61519e 100755
--- a/share/hydractl/deploy
+++ b/share/hydractl/deploy
@@ -20,6 +20,11 @@
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