Index: hiera/files/classify.sh |
diff --git a/hiera/files/classify.sh b/hiera/files/classify.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..4d3b34f6d842fb4cb497f5233ea017c53762be50 |
--- /dev/null |
+++ b/hiera/files/classify.sh |
@@ -0,0 +1,8 @@ |
+#!/bin/sh |
+HOSTNAME=`echo "$@" | sed 's/\..*$//'` |
+( echo -n 'classes = '; hiera classes ::hostname=$HOSTNAME |
+ echo -n 'parameters = '; hiera parameters ::hostname=$HOSTNAME |
+ echo 'data = {"classes"=>classes, "parameters"=>parameters}' |
+ echo 'print data.to_yaml' ) \ |
+| ruby -ryaml |
Wladimir Palant
2014/09/09 18:15:06
Wow, that's quite a hack...
Why use a shell scrip
mathias
2014/10/08 03:02:33
Of course it's to be converted - this one here was
|
+ |