]> gitweb.fluxo.info Git - hydra.git/commitdiff
Nodes: adapt to the new nodo module format for node selection
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 5 Jan 2014 13:58:55 +0000 (11:58 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 5 Jan 2014 13:58:55 +0000 (11:58 -0200)
README
share/hydra/nodes

diff --git a/README b/README
index f85acd5e8439c8dbd0faf07bd00395eee619bd68..d3a453a7385cf7945fd49401a7c1e582aa924cd0 100644 (file)
--- 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.
index 455b00b5088612e3905bd81f79c624b8753d1931..b070680934815787eaee4dc556bbd2218ebcc495 100755 (executable)
@@ -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