From c855d0682aac874fbb64c5cf87e8f3f54ee1aa61 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 3 Oct 2019 16:11:34 -0300 Subject: Newnode: additional checks for puppet an ansible folders --- share/hydra/newnode | 20 ++++++++++++-------- 1 file 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 ) -- cgit v1.2.3