|
@@ -7,6 +7,24 @@
|
|
l_install_base_packages: True
|
|
l_install_base_packages: True
|
|
l_repo_hosts: "all:!all"
|
|
l_repo_hosts: "all:!all"
|
|
|
|
|
|
|
|
+- name: Read in openshift-install
|
|
|
|
+ hosts: masters[0]
|
|
|
|
+ tasks:
|
|
|
|
+ - slurp:
|
|
|
|
+ src: "{{ openshift_install_config_path }}"
|
|
|
|
+ register: openshift_install_config_reg
|
|
|
|
+ delegate_to: localhost
|
|
|
|
+ run_once: True
|
|
|
|
+ - set_fact:
|
|
|
|
+ openshift_install_config: "{{ openshift_install_config_reg['content'] | b64decode | from_yaml }}"
|
|
|
|
+
|
|
|
|
+# We might need to access these values on each host later.
|
|
|
|
+- name: set_fact openshift_install_config across all nodes
|
|
|
|
+ hosts: nodes
|
|
|
|
+ tasks:
|
|
|
|
+ - set_fact:
|
|
|
|
+ openshift_install_config: "{{ hostvars[groups['masters'][0]].openshift_install_config }}"
|
|
|
|
+
|
|
# TODO(michaelgugino): break up the rest of this file into reusable chunks.
|
|
# TODO(michaelgugino): break up the rest of this file into reusable chunks.
|
|
- name: Install nodes
|
|
- name: Install nodes
|
|
hosts: nodes
|
|
hosts: nodes
|
|
@@ -41,10 +59,9 @@
|
|
|
|
|
|
- name: Start masters
|
|
- name: Start masters
|
|
hosts: masters
|
|
hosts: masters
|
|
|
|
+ vars:
|
|
|
|
+ openshift_bootstrap_endpoint: "{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/master"
|
|
tasks:
|
|
tasks:
|
|
- # This is required for openshift_node40/config.yml
|
|
|
|
- - set_fact:
|
|
|
|
- openshift_bootstrap_endpoint: "https://{{ openshift_master_cluster_hostname }}:{{ mcd_port }}/config/master"
|
|
|
|
- name: Wait for bootstrap endpoint to show up
|
|
- name: Wait for bootstrap endpoint to show up
|
|
uri:
|
|
uri:
|
|
url: "{{ openshift_bootstrap_endpoint }}"
|
|
url: "{{ openshift_bootstrap_endpoint }}"
|
|
@@ -67,10 +84,9 @@
|
|
|
|
|
|
- name: Start workers
|
|
- name: Start workers
|
|
hosts: workers
|
|
hosts: workers
|
|
|
|
+ vars:
|
|
|
|
+ openshift_bootstrap_endpoint: "{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/worker"
|
|
tasks:
|
|
tasks:
|
|
- # This is required for openshift_node40/config.yml
|
|
|
|
- - set_fact:
|
|
|
|
- openshift_bootstrap_endpoint: "https://{{ openshift_master_cluster_hostname }}:{{ mcd_port }}/config/worker"
|
|
|
|
- name: Wait for bootstrap endpoint to show up
|
|
- name: Wait for bootstrap endpoint to show up
|
|
uri:
|
|
uri:
|
|
url: "{{ openshift_bootstrap_endpoint }}"
|
|
url: "{{ openshift_bootstrap_endpoint }}"
|