aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-01-05 11:58:55 -0200
committerSilvio Rhatto <rhatto@riseup.net>2014-01-05 11:58:55 -0200
commit1ca957ff6f243a319344b7d607d7184f667a0951 (patch)
tree4715e441ce75c2c17b3b1d3d4eb975462d05cc40
parentefbe631b5f13fe25e93866c07964b0ac4c9bce44 (diff)
downloadhydra-1ca957ff6f243a319344b7d607d7184f667a0951.tar.gz
hydra-1ca957ff6f243a319344b7d607d7184f667a0951.tar.bz2
Nodes: adapt to the new nodo module format for node selection
-rw-r--r--README1
-rwxr-xr-xshare/hydra/nodes10
2 files changed, 7 insertions, 4 deletions
diff --git a/README b/README
index f85acd5..d3a453a 100644
--- a/README
+++ b/README
@@ -17,5 +17,4 @@ Hydra:
- Sync: clone hydra configuration repository that should be created by the new init action.
- Sync: split between public and private repositories.
- Sync: Git clone URL recommendation which support for both git-annex and non-standard port.
- - Nodes: adapt to the new nodo module format for node selection.
- Uniform syntax for specifying nodes (either by hostname or fqdn) on deploy and import-key.
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