From 6c77d5dfec211018d666d847e0c872928b989f02 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 5 Mar 2016 23:00:17 -0300 Subject: Cleanup --- share/hydra/nodes | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'share/hydra/nodes') diff --git a/share/hydra/nodes b/share/hydra/nodes index 4ddf916..e2a318d 100755 --- a/share/hydra/nodes +++ b/share/hydra/nodes @@ -20,31 +20,16 @@ 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 -- cgit v1.2.3