summaryrefslogtreecommitdiffstats
path: root/opts.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 /opts.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 'opts.sh')
-rw-r--r--opts.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/opts.sh b/opts.sh
index 020fb44..57c26f9 100644
--- a/opts.sh
+++ b/opts.sh
@@ -19,6 +19,7 @@ Actions:
local - configure local ssh client
prepare - perform all required pre-configuration before setting openshift
openshift - setup OpenShift cluster
+ gluster - configure gluster software and volumes
configure - configures OpenShift cluster (Storage, Users, OpenVPN tunnels)
projects - installs configuration files and OpenShift resources for KaaS and other configured projects
@@ -39,7 +40,7 @@ Actions:
Tasks: hostnames, users, ssh, storage, heketi
Custom actions
- playbook.yml - execute the specified playbook
+ playbook.yml - execute the specified playbook (after ands_facts)
role - generates temporary playbook and executes the role
END
@@ -57,7 +58,22 @@ apply() {
shift 1
if [ -f "$action" ]; then
- playbook=$action
+ if [[ "$action" == anslib/* ]]; then
+ echo "Executing a library playbook '$action'"
+ cat <<END > playbooks/tmp_play.yml
+- name: Common setup procedures
+ hosts: $group
+ remote_user: root
+ roles:
+ - ands_facts
+
+- import_playbook: ../$action
+END
+ playbook="playbooks/tmp_play.yml"
+ clean="playbooks/tmp_play.*"
+ else
+ playbook=$action
+ fi
elif [ -d "roles/$action" ]; then
role=$action
else
@@ -80,7 +96,8 @@ apply() {
END
fi
- ansible-playbook --vault-password-file .vault-pass -i $inventory $playbook $@
+# ansible-playbook -vvv --vault-password-file .vault-pass -i $inventory $playbook $@
+ ansible-playbook --vault-password-file .vault-pass -i $inventory $playbook $@
if [ -n "$clean" ]; then
rm -rf "$clean"