summaryrefslogtreecommitdiffstats
path: root/opts.sh
diff options
context:
space:
mode:
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"