From 1ca957ff6f243a319344b7d607d7184f667a0951 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 5 Jan 2014 11:58:55 -0200 Subject: Nodes: adapt to the new nodo module format for node selection --- share/hydra/nodes | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'share') diff --git a/share/hydra/nodes b/share/hydra/nodes index 455b00b..b070680 100755 --- a/share/hydra/nodes +++ b/share/hydra/nodes @@ -54,9 +54,13 @@ hydra_node_files # Get nodes if [ ! -z "$CLASS" ]; then - FILES="`hydra_node_lines | cut -d ':' -f 1`" - FILES="`grep nodo::$CLASS $FILES | cut -d ':' -f 1`" - hydra_nodes + hydra_nodes | while read node; do + find $PUPPET/hiera -name "$node.yaml" + done | while read candidate; do + if grep -e "$CLASS" $candidate | grep -qe "^nodo::role"; then + basename $candidate .yaml + fi + done else hydra_nodes fi -- cgit v1.2.3