]> gitweb.fluxo.info Git - hydra.git/commitdiff
Cleanup
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Mar 2016 02:00:17 +0000 (23:00 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Mar 2016 02:00:17 +0000 (23:00 -0300)
share/hydra/nodes

index 4ddf9165381ea6509771f768415720e7f7de8ac0..e2a318d67c6b89ef3d683208ebc697f347786848 100755 (executable)
 function hydra_node_files {
   if [ -d "$PUPPET/hiera/node/" ]; then
     FILES="$PUPPET/hiera/node/*"
-  elif [ -d "$PUPPET/manifests/nodes/" ]; then
-    FILES="$PUPPET/manifests/nodes/*"
-  else
-    FILES="`find $PUPPET -name 'nodes.pp'`"
   fi
 }
 
-# Get using the filename
-function hydra_node_names {
+# Return node names
+function hydra_nodes {
   for file in $FILES; do
     basename $file .yaml
   done
 }
 
-# Get all lines matching a node definition
-function hydra_node_lines {
-  # See http://www.mail-archive.com/puppet-users@googlegroups.com/msg01615.html
-  grep ^node $FILES | sed -e 's/^node //' | awk -F, '{for(i=1;i<=NF;i++) {print $i}}'
-}
-
-# Default node retrieval method
-function hydra_nodes {
-  hydra_node_names
-}
-
 # Load
 source $APP_BASE/lib/hydra/functions || exit 1
 hydra_config_load