aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-10-03 16:11:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-10-03 16:11:34 -0300
commitc855d0682aac874fbb64c5cf87e8f3f54ee1aa61 (patch)
treec8a06b248a9d45fca5c5a8ea1ec321498e60de46
parentbbca67466c58b6496cf2764103441b77a93288f4 (diff)
downloadhydra-c855d0682aac874fbb64c5cf87e8f3f54ee1aa61.tar.gz
hydra-c855d0682aac874fbb64c5cf87e8f3f54ee1aa61.tar.bz2
Newnode: additional checks for puppet an ansible folders
-rwxr-xr-xshare/hydra/newnode20
1 files changed, 12 insertions, 8 deletions
diff --git a/share/hydra/newnode b/share/hydra/newnode
index 3e32d8a..299e2ae 100755
--- a/share/hydra/newnode
+++ b/share/hydra/newnode
@@ -93,14 +93,18 @@ fi
# Add to git
(
- cd $HYDRA_FOLDER/puppet
- #git add manifests/nodes/$NODE.pp config/node/$NODE.yaml config/secrets/node/$NODE.yaml
- git add config/node/$NODE.yaml config/secrets/node/$NODE.yaml
+ if [ -e "$HYDRA_FOLDER/puppet" ]; then
+ cd $HYDRA_FOLDER/puppet
+ #git add manifests/nodes/$NODE.pp config/node/$NODE.yaml config/secrets/node/$NODE.yaml
+ git add config/node/$NODE.yaml config/secrets/node/$NODE.yaml
- #if [ -e 'manifests/site.pp' ]; then
- # git add manifests/site.pp
- #fi
+ #if [ -e 'manifests/site.pp' ]; then
+ # git add manifests/site.pp
+ #fi
+ fi
- cd $HYDRA_FOLDER/ansible
- git add .
+ if [ -e "$HYDRA_FOLDER/ansible" ]; then
+ cd $HYDRA_FOLDER/ansible
+ git add .
+ fi
)