aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/nodes
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-11-13 16:01:50 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-11-13 16:01:50 -0200
commit1c975d65f221eb78baf2808893c059091740da2a (patch)
tree74f045e035ccea1150b0bf2ef92dbcc5ddfcea31 /share/hydra/nodes
parentaad028515f31567af2155c7448201663535000a3 (diff)
downloadhydra-1c975d65f221eb78baf2808893c059091740da2a.tar.gz
hydra-1c975d65f221eb78baf2808893c059091740da2a.tar.bz2
Initial deploy and module-update tasks
Diffstat (limited to 'share/hydra/nodes')
-rwxr-xr-xshare/hydra/nodes13
1 files changed, 8 insertions, 5 deletions
diff --git a/share/hydra/nodes b/share/hydra/nodes
index c7e4c4c..6b9d101 100755
--- a/share/hydra/nodes
+++ b/share/hydra/nodes
@@ -6,13 +6,16 @@
# Default node retrieval method
function hydra_get_nodes {
# See http://www.mail-archive.com/puppet-users@googlegroups.com/msg01615.html
- grep ^node $* | sed -e 's/^node //' | awk -F, '{for(i=1;i<=NF;i++) {print $i}}' | cut -d "'" -f2
+ if [ -d "$PUPPET/manifests/nodes/" ]; then
+ files="$PUPPET/manifests/nodes/*"
+ else
+ files="`find $PUPPET -name 'nodes.pp'`"
+ fi
+ grep ^node $files | sed -e 's/^node //' | awk -F, '{for(i=1;i<=NF;i++) {print $i}}' | cut -d "'" -f2
}
-# Load functions
+# Load
source $APP_BASE/lib/hydra/functions || exit 1
-
-# Load config
hydra_config_load
# Validation
@@ -22,4 +25,4 @@ if [ -z "$PUPPET" ]; then
fi
# Get nodes
-hydra_get_nodes $PUPPET/manifests/nodes/*
+hydra_get_nodes