summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall/cli_installer.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src/ooinstall/cli_installer.py')
-rw-r--r--utils/src/ooinstall/cli_installer.py28
1 files changed, 11 insertions, 17 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index dd17fbf89..347ae7ec9 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -25,6 +25,7 @@ installer_file_handler.setLevel(logging.DEBUG)
installer_log.addHandler(installer_file_handler)
DEFAULT_ANSIBLE_CONFIG = '/usr/share/atomic-openshift-utils/ansible.cfg'
+QUIET_ANSIBLE_CONFIG = '/usr/share/atomic-openshift-utils/ansible-quiet.cfg'
DEFAULT_PLAYBOOK_DIR = '/usr/share/ansible/openshift-ansible/'
UPGRADE_MAPPINGS = {
@@ -483,8 +484,7 @@ def get_variant_and_version(multi_master=False):
i = 1
combos = get_variant_version_combos()
for (variant, version) in combos:
- message = "%s\n(%s) %s %s" % (message, i, variant.description,
- version.name)
+ message = "%s\n(%s) %s" % (message, i, variant.description)
i = i + 1
message = "%s\n" % message
@@ -751,7 +751,9 @@ def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force, verbose):
hosts_to_run_on.remove(host)
# Handle the cases where we know about uninstalled systems
- if len(uninstalled_hosts) > 0:
+ # TODO: This logic is getting hard to understand.
+ # we should revise all this to be cleaner.
+ if not force and len(uninstalled_hosts) > 0:
for uninstalled_host in uninstalled_hosts:
click.echo("{} is currently uninstalled".format(uninstalled_host))
# Fall through
@@ -791,7 +793,7 @@ def set_infra_nodes(hosts):
if all(host.is_master() for host in hosts):
infra_list = hosts
else:
- nodes_list = [host for host in hosts if host.is_node()]
+ nodes_list = [host for host in hosts if host.is_schedulable_node(hosts)]
infra_list = nodes_list[:2]
for host in infra_list:
@@ -816,12 +818,6 @@ def set_infra_nodes(hosts):
# callback=validate_ansible_dir,
default=DEFAULT_PLAYBOOK_DIR,
envvar='OO_ANSIBLE_PLAYBOOK_DIRECTORY')
-@click.option('--ansible-config',
- type=click.Path(file_okay=True,
- dir_okay=False,
- writable=True,
- readable=True),
- default=None)
@click.option('--ansible-log-path',
type=click.Path(file_okay=True,
dir_okay=False,
@@ -837,7 +833,7 @@ def set_infra_nodes(hosts):
# pylint: disable=too-many-arguments
# pylint: disable=line-too-long
# Main CLI entrypoint, not much we can do about too many arguments.
-def cli(ctx, unattended, configuration, ansible_playbook_directory, ansible_config, ansible_log_path, verbose, debug):
+def cli(ctx, unattended, configuration, ansible_playbook_directory, ansible_log_path, verbose, debug):
"""
atomic-openshift-installer makes the process for installing OSE or AEP
easier by interactively gathering the data needed to run on each host.
@@ -856,7 +852,6 @@ def cli(ctx, unattended, configuration, ansible_playbook_directory, ansible_conf
ctx.obj = {}
ctx.obj['unattended'] = unattended
ctx.obj['configuration'] = configuration
- ctx.obj['ansible_config'] = ansible_config
ctx.obj['ansible_log_path'] = ansible_log_path
ctx.obj['verbose'] = verbose
@@ -877,13 +872,13 @@ def cli(ctx, unattended, configuration, ansible_playbook_directory, ansible_conf
oo_cfg.ansible_playbook_directory = ansible_playbook_directory
ctx.obj['ansible_playbook_directory'] = ansible_playbook_directory
- if ctx.obj['ansible_config']:
- oo_cfg.settings['ansible_config'] = ctx.obj['ansible_config']
- elif 'ansible_config' not in oo_cfg.settings and \
- os.path.exists(DEFAULT_ANSIBLE_CONFIG):
+ if os.path.exists(DEFAULT_ANSIBLE_CONFIG):
# If we're installed by RPM this file should exist and we can use it as our default:
oo_cfg.settings['ansible_config'] = DEFAULT_ANSIBLE_CONFIG
+ if os.path.exists(QUIET_ANSIBLE_CONFIG):
+ oo_cfg.settings['ansible_quiet_config'] = QUIET_ANSIBLE_CONFIG
+
oo_cfg.settings['ansible_log_path'] = ctx.obj['ansible_log_path']
ctx.obj['oo_cfg'] = oo_cfg
@@ -1085,7 +1080,6 @@ more:
http://docs.openshift.com/enterprise/latest/admin_guide/overview.html
"""
click.echo(message)
- click.pause()
cli.add_command(install)
cli.add_command(upgrade)