From f3b527b2875e94b6e8165032f984cdd24e1f239e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 20 Mar 2016 15:10:11 -0300 Subject: Updates whereis --- share/hydra/whereis | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'share') diff --git a/share/hydra/whereis b/share/hydra/whereis index 687b280..515218b 100755 --- a/share/hydra/whereis +++ b/share/hydra/whereis @@ -38,31 +38,18 @@ echo "-------------------------------------------------------------------------- echo "" # Is it a node? -if [ -e "$PUPPET/manifests/nodes/$LAYER.pp" ]; then - echo "Defined as a node at $PUPPET/manifests/nodes/$LAYER.pp" - - if [ -e "$PUPPET/hiera/production/domain/$DOMAIN/node/$LAYER.$DOMAIN.yaml" ]; then - echo "Configuration:" - echo "" - grep "nodo::role:" $PUPPET/hiera/production/domain/$DOMAIN/node/$LAYER.$DOMAIN.yaml - grep "nodo::location:" $PUPPET/hiera/production/domain/$DOMAIN/node/$LAYER.$DOMAIN.yaml - fi -fi - -# Is it a website? -if [ -e "$PUPPET/modules/site_websites" ] && \ - grep -R -e "apache::site" "$PUPPET/modules/site_websites/manifests/" | grep -q "$LAYER" ; then - MANIFEST="$(cd $PUPPET && grep -R -e "apache::site" "modules/site_websites/manifests/" | grep "$LAYER" | cut -d : -f 1)" - - echo "Defined as a website on $MANIFEST:" +if [ -e "$PUPPET/hiera/node/$LAYER.$DOMAIN.yaml" ]; then + echo "Defined as a node at hiera/node/$LAYER.$DOMAIN.yaml" + echo "Configuration:" echo "" - sed -n -e "/apache::site { \"$LAYER\":/,/ }/ p" $PUPPET/$MANIFEST + grep "nodo::role:" $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml + grep "nodo::location:" $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml fi # DNS config if [ -e "$HYDRA_FOLDER/dns/$DOMAIN.conf" ]; then echo "" - echo "DNS configuration at $HYDRA_FOLDER/dns/$DOMAIN.conf" + echo "DNS configuration at dns/$DOMAIN.conf" echo "----------------------------------------------------------------------------------" echo "" -- cgit v1.2.3