diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-02-07 10:20:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 10:20:41 -0800 |
commit | 4fe53adf947c7d202f0fc53569891af322e2a5f3 (patch) | |
tree | fc3a6da3a60637cd74a8e08d798ba47e218a3041 /utils/src/ooinstall/openshift_ansible.py | |
parent | b5a24da7b37515e7bfbfd46cfdd0f95ce3986711 (diff) | |
parent | 62022c50253e3c37504fbbbc2e0c308f84bc2d83 (diff) | |
download | openshift-4fe53adf947c7d202f0fc53569891af322e2a5f3.tar.gz openshift-4fe53adf947c7d202f0fc53569891af322e2a5f3.tar.bz2 openshift-4fe53adf947c7d202f0fc53569891af322e2a5f3.tar.xz openshift-4fe53adf947c7d202f0fc53569891af322e2a5f3.zip |
Merge pull request #7045 from vrutkovs/quick-installer-new-playbook-paths
Automatic merge from submit-queue.
Quick installer: run prerequistes first and update path to main playbook
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1542895
Diffstat (limited to 'utils/src/ooinstall/openshift_ansible.py')
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index 84a76fa53..5e1ad09d5 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -275,6 +275,21 @@ def default_facts(hosts, verbose=False): return load_system_facts(inventory_file, os_facts_path, facts_env, verbose) +def run_prerequisites(inventory_file, hosts, hosts_to_run_on, verbose=False): + global CFG + prerequisites_playbook_path = os.path.join(CFG.ansible_playbook_directory, + 'playbooks/prerequisites.yml') + facts_env = os.environ.copy() + if 'ansible_log_path' in CFG.settings: + facts_env['ANSIBLE_LOG_PATH'] = CFG.settings['ansible_log_path'] + + # override the ansible config for prerequisites playbook run + if 'ansible_quiet_config' in CFG.settings: + facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_quiet_config'] + + return run_ansible(prerequisites_playbook_path, inventory_file, facts_env, verbose) + + def run_main_playbook(inventory_file, hosts, hosts_to_run_on, verbose=False): global CFG if len(hosts_to_run_on) != len(hosts): @@ -282,7 +297,7 @@ def run_main_playbook(inventory_file, hosts, hosts_to_run_on, verbose=False): 'playbooks/openshift-node/scaleup.yml') else: main_playbook_path = os.path.join(CFG.ansible_playbook_directory, - 'playbooks/byo/openshift-cluster/config.yml') + 'playbooks/deploy_cluster.yml') facts_env = os.environ.copy() if 'ansible_log_path' in CFG.settings: facts_env['ANSIBLE_LOG_PATH'] = CFG.settings['ansible_log_path'] |