aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/whereis
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-20 15:10:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-20 15:10:11 -0300
commitf3b527b2875e94b6e8165032f984cdd24e1f239e (patch)
treef2a503b3d184ad13761f5c6e54ec8e389d9084c6 /share/hydra/whereis
parent808e553a01074fc1f41f6f29fe07cfcb196e03f6 (diff)
downloadhydra-f3b527b2875e94b6e8165032f984cdd24e1f239e.tar.gz
hydra-f3b527b2875e94b6e8165032f984cdd24e1f239e.tar.bz2
Updates whereis
Diffstat (limited to 'share/hydra/whereis')
-rwxr-xr-xshare/hydra/whereis25
1 files changed, 6 insertions, 19 deletions
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 ""