summaryrefslogtreecommitdiff
path: root/share/hydra/whereis
diff options
context:
space:
mode:
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 ""