summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall/openshift_ansible.py
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2016-10-06 13:28:15 -0400
committerSamuel Munilla <smunilla@redhat.com>2016-10-20 14:35:04 -0400
commit1c7dd6d5cd94c92ebec0a0fda789f4bfffa23472 (patch)
tree2aa9c54e371e3875fe006448058b5ae6e3716775 /utils/src/ooinstall/openshift_ansible.py
parent4a5b2dd0510ac092da44a09730a734fe9ef7e112 (diff)
downloadopenshift-1c7dd6d5cd94c92ebec0a0fda789f4bfffa23472.tar.gz
openshift-1c7dd6d5cd94c92ebec0a0fda789f4bfffa23472.tar.bz2
openshift-1c7dd6d5cd94c92ebec0a0fda789f4bfffa23472.tar.xz
openshift-1c7dd6d5cd94c92ebec0a0fda789f4bfffa23472.zip
a-o-i: Separate install and scaleup workflows
In order to simplify the quick installer logic, this moves the scaleup workflow into its own subcommand. Fixes: Bug 1339621
Diffstat (limited to 'utils/src/ooinstall/openshift_ansible.py')
-rw-r--r--utils/src/ooinstall/openshift_ansible.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py
index 80a79a6d2..764cc1e56 100644
--- a/utils/src/ooinstall/openshift_ansible.py
+++ b/utils/src/ooinstall/openshift_ansible.py
@@ -48,9 +48,6 @@ def set_config(cfg):
def generate_inventory(hosts):
global CFG
- masters = [host for host in hosts if host.is_master()]
- multiple_masters = len(masters) > 1
-
new_nodes = [host for host in hosts if host.is_node() and host.new_host]
scaleup = len(new_nodes) > 0
@@ -61,7 +58,7 @@ def generate_inventory(hosts):
write_inventory_children(base_inventory, scaleup)
- write_inventory_vars(base_inventory, multiple_masters, lb)
+ write_inventory_vars(base_inventory, lb)
# write_inventory_hosts
for role in CFG.deployment.roles:
@@ -106,7 +103,7 @@ def write_inventory_children(base_inventory, scaleup):
# pylint: disable=too-many-branches
-def write_inventory_vars(base_inventory, multiple_masters, lb):
+def write_inventory_vars(base_inventory, lb):
global CFG
base_inventory.write('\n[OSEv3:vars]\n')
@@ -123,7 +120,7 @@ def write_inventory_vars(base_inventory, multiple_masters, lb):
if CFG.deployment.variables['ansible_ssh_user'] != 'root':
base_inventory.write('ansible_become=yes\n')
- if multiple_masters and lb is not None:
+ if lb is not None:
base_inventory.write('openshift_master_cluster_method=native\n')
base_inventory.write("openshift_master_cluster_hostname={}\n".format(lb.hostname))
base_inventory.write(