summaryrefslogtreecommitdiffstats
path: root/anslib/link_vars.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-02-16 20:54:52 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-02-16 20:54:52 +0100
commit96ced00e05b50f276841a9212ae89e018de4d92d (patch)
treeb86c75fa97326dc89cc37c6dd23d294bd13eb56a /anslib/link_vars.sh
parentcd94e324d3401e518578d91382a2b7ee67562112 (diff)
downloadands-96ced00e05b50f276841a9212ae89e018de4d92d.tar.gz
ands-96ced00e05b50f276841a9212ae89e018de4d92d.tar.bz2
ands-96ced00e05b50f276841a9212ae89e018de4d92d.tar.xz
ands-96ced00e05b50f276841a9212ae89e018de4d92d.zip
Updated to OpenShift 3.7 and tested
Diffstat (limited to 'anslib/link_vars.sh')
-rwxr-xr-xanslib/link_vars.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/anslib/link_vars.sh b/anslib/link_vars.sh
new file mode 100755
index 0000000..01a9fe9
--- /dev/null
+++ b/anslib/link_vars.sh
@@ -0,0 +1,26 @@
+
+function mklink_func {
+# if [ -d openshift-cluster ]; then
+# mklink_func "openshift-cluster"
+# fi
+
+ name=$(basename "$1")
+# [[ $name == "private" ]] && exit
+ [[ $name == "vars" ]] && exit
+ [[ $name == "roles" ]] && exit
+
+ (
+ cd $1
+ path=..
+ while [ ! -f "$path/link_vars.sh" ]; do
+ path="../$path"
+ done
+ path="../$path"
+
+ ln -sf "$path/group_vars"
+ ln -sf "$path/host_vars"
+ )
+}
+
+export -f mklink_func
+find openshift-ansible/playbooks -mindepth 0 -maxdepth 2 -type d -print0 | xargs -0 -L 1 -I {} bash -c 'mklink_func "$@"' _ {}