diff options
Diffstat (limited to 'utils/src')
-rw-r--r-- | utils/src/data/data_file | 1 | ||||
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 12 | ||||
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 8 |
3 files changed, 15 insertions, 6 deletions
diff --git a/utils/src/data/data_file b/utils/src/data/data_file deleted file mode 100644 index 7c0646bfd..000000000 --- a/utils/src/data/data_file +++ /dev/null @@ -1 +0,0 @@ -some data
\ No newline at end of file diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 286e50f64..7e5ad4144 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -318,6 +318,7 @@ hostname. def set_cluster_hostname(oo_cfg): + first_master = next((host for host in oo_cfg.deployment.hosts if host.is_master()), None) message = """ You have chosen to install a single master cluster (non-HA). @@ -329,8 +330,9 @@ If you want to override the cluster host name now to something other than the de """ click.echo(message) cluster_hostname = click.prompt('Enter hostname or IP address', - default='') + default=str(first_master)) oo_cfg.deployment.variables['openshift_master_cluster_hostname'] = cluster_hostname + oo_cfg.deployment.variables['openshift_master_cluster_public_hostname'] = cluster_hostname def collect_storage_host(hosts): @@ -739,17 +741,17 @@ def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force): installed_hosts, uninstalled_hosts = get_installed_hosts(oo_cfg.deployment.hosts, callback_facts) nodes = [host for host in oo_cfg.deployment.hosts if host.is_node()] - not_balancers = [host for host in oo_cfg.deployment.hosts if not host.is_master_lb()] + masters_and_nodes = [host for host in oo_cfg.deployment.hosts if host.is_master() or host.is_node()] in_hosts = [str(h) for h in installed_hosts] un_hosts = [str(h) for h in uninstalled_hosts] all_hosts = [str(h) for h in oo_cfg.deployment.hosts] - no_bals = [str(h) for h in not_balancers] + m_and_n = [str(h) for h in masters_and_nodes] INSTALLER_LOG.debug("installed hosts: %s", ", ".join(in_hosts)) INSTALLER_LOG.debug("uninstalled hosts: %s", ", ".join(un_hosts)) INSTALLER_LOG.debug("deployment hosts: %s", ", ".join(all_hosts)) - INSTALLER_LOG.debug("not balancers: %s", ", ".join(no_bals)) + INSTALLER_LOG.debug("masters and nodes: %s", ", ".join(m_and_n)) # Case (1): All uninstalled hosts if len(uninstalled_hosts) == len(nodes): @@ -757,7 +759,7 @@ def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force): hosts_to_run_on = list(oo_cfg.deployment.hosts) else: # Case (2): All installed hosts - if len(installed_hosts) == len(not_balancers): + if len(installed_hosts) == len(masters_and_nodes): message = """ All specified hosts in specified environment are installed. """ diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index 764cc1e56..f542fb376 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -314,6 +314,10 @@ def run_uninstall_playbook(hosts, verbose=False): facts_env['ANSIBLE_LOG_PATH'] = CFG.settings['ansible_log_path'] if 'ansible_config' in CFG.settings: facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_config'] + # override the ansible config for our main playbook run + if 'ansible_quiet_config' in CFG.settings: + facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_quiet_config'] + return run_ansible(playbook, inventory_file, facts_env, verbose) @@ -328,4 +332,8 @@ def run_upgrade_playbook(hosts, playbook, verbose=False): facts_env['ANSIBLE_LOG_PATH'] = CFG.settings['ansible_log_path'] if 'ansible_config' in CFG.settings: facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_config'] + # override the ansible config for our main playbook run + if 'ansible_quiet_config' in CFG.settings: + facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_quiet_config'] + return run_ansible(playbook, inventory_file, facts_env, verbose) |