summaryrefslogtreecommitdiff
path: root/share/hydra/whereis
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-21 11:28:12 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-21 11:28:12 -0300
commit6ebba3b8240d58ae749216ffa6254b9f7d2a2b9d (patch)
tree4e9745c0c73d74cb85fe91e1113f20652bb9c4f8 /share/hydra/whereis
parente40b3514e041a4bb2aac962b639c947333365b4b (diff)
parent8addf3ea71f50050a791e618bd4511860264c0de (diff)
downloadhydra-6ebba3b8240d58ae749216ffa6254b9f7d2a2b9d.tar.gz
hydra-6ebba3b8240d58ae749216ffa6254b9f7d2a2b9d.tar.bz2
Merge branch 'master' into develop
Conflicts: TODO.md share/hydra/install share/hydra/mass share/hydractl/bootstrap share/hydractl/puppet-enable share/hydractl/system-upgrade
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 ""