aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
)