aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/nodes
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-05 23:00:17 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-05 23:00:17 -0300
commit6c77d5dfec211018d666d847e0c872928b989f02 (patch)
treee8a6b707ff9eae13cc782b7b6bf4c62cb4757886 /share/hydra/nodes
parent17dee411a4e39dc17ae578cd20390c262874d150 (diff)
downloadhydra-6c77d5dfec211018d666d847e0c872928b989f02.tar.gz
hydra-6c77d5dfec211018d666d847e0c872928b989f02.tar.bz2
Cleanup
Diffstat (limited to 'share/hydra/nodes')
-rwxr-xr-xshare/hydra/nodes19
1 files changed, 2 insertions, 17 deletions
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