From 96ced00e05b50f276841a9212ae89e018de4d92d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 16 Feb 2018 20:54:52 +0100 Subject: Updated to OpenShift 3.7 and tested --- opts.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'opts.sh') 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 < 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" -- cgit v1.2.3