diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-07-27 14:47:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-27 14:47:40 -0400 |
commit | ea228309b94efca1584ab87e28260fb957a780b5 (patch) | |
tree | 70de97253b0650a2b609a1a8bdb6b3dd73c427b2 | |
parent | 945403f494197b63a41a4503672f15198a6c17a1 (diff) | |
parent | 24feba77169944370da803548fcfefa608b86441 (diff) | |
download | openshift-ea228309b94efca1584ab87e28260fb957a780b5.tar.gz openshift-ea228309b94efca1584ab87e28260fb957a780b5.tar.bz2 openshift-ea228309b94efca1584ab87e28260fb957a780b5.tar.xz openshift-ea228309b94efca1584ab87e28260fb957a780b5.zip |
Merge pull request #2226 from smunilla/general_inventory_vars
a-o-i: Move inventory vars to the correct location
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index 352955026..b93178e77 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -49,23 +49,7 @@ def generate_inventory(hosts): write_inventory_vars(base_inventory, multiple_masters, proxy) - # Find the correct deployment type for ansible: - ver = find_variant(CFG.settings['variant'], - version=CFG.settings.get('variant_version', None))[1] - base_inventory.write('deployment_type={}\n'.format(ver.ansible_key)) - if 'OO_INSTALL_ADDITIONAL_REGISTRIES' in os.environ: - base_inventory.write('openshift_docker_additional_registries={}\n' - .format(os.environ['OO_INSTALL_ADDITIONAL_REGISTRIES'])) - if 'OO_INSTALL_INSECURE_REGISTRIES' in os.environ: - base_inventory.write('openshift_docker_insecure_registries={}\n' - .format(os.environ['OO_INSTALL_INSECURE_REGISTRIES'])) - if 'OO_INSTALL_PUDDLE_REPO' in os.environ: - # We have to double the '{' here for literals - base_inventory.write("openshift_additional_repos=[{{'id': 'ose-devel', " - "'name': 'ose-devel', " - "'baseurl': '{}', " - "'enabled': 1, 'gpgcheck': 0}}]\n".format(os.environ['OO_INSTALL_PUDDLE_REPO'])) base_inventory.write('\n[masters]\n') for master in masters: @@ -162,6 +146,24 @@ def write_inventory_vars(base_inventory, multiple_masters, proxy): write_proxy_settings(base_inventory) + # Find the correct deployment type for ansible: + ver = find_variant(CFG.settings['variant'], + version=CFG.settings.get('variant_version', None))[1] + base_inventory.write('deployment_type={}\n'.format(ver.ansible_key)) + + if 'OO_INSTALL_ADDITIONAL_REGISTRIES' in os.environ: + base_inventory.write('openshift_docker_additional_registries={}\n' + .format(os.environ['OO_INSTALL_ADDITIONAL_REGISTRIES'])) + if 'OO_INSTALL_INSECURE_REGISTRIES' in os.environ: + base_inventory.write('openshift_docker_insecure_registries={}\n' + .format(os.environ['OO_INSTALL_INSECURE_REGISTRIES'])) + if 'OO_INSTALL_PUDDLE_REPO' in os.environ: + # We have to double the '{' here for literals + base_inventory.write("openshift_additional_repos=[{{'id': 'ose-devel', " + "'name': 'ose-devel', " + "'baseurl': '{}', " + "'enabled': 1, 'gpgcheck': 0}}]\n".format(os.environ['OO_INSTALL_PUDDLE_REPO'])) + for name, role_obj in CFG.deployment.roles.iteritems(): if role_obj.variables: group_name = ROLES_TO_GROUPS_MAP.get(name, name) |