summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/common/openshift-master/config.yml2
-rw-r--r--playbooks/common/openshift-node/config.yml20
2 files changed, 17 insertions, 5 deletions
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index fb35a9d2f..97a7db9a1 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -158,6 +158,7 @@
# Must be run before generating master certs which involved openshift_cli role and needs
# to pull down the correct docker container:
+# TODO: Handle rpm installs here
- name: Determine openshift_version to install on first master
hosts: oo_first_master
any_errors_fatal: true
@@ -366,7 +367,6 @@
serial: 1
vars:
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
- openshift_version: "{{ g_openshift_version_requested }}"
openshift_master_ha: "{{ openshift.master.ha }}"
openshift_master_count: "{{ openshift.master.master_count }}"
openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}"
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
index 9809ee629..5e92b5cbd 100644
--- a/playbooks/common/openshift-node/config.yml
+++ b/playbooks/common/openshift-node/config.yml
@@ -109,11 +109,26 @@
with_items: "{{ groups.oo_nodes_to_config | default([]) }}"
when: hostvars[item].openshift.common.is_containerized | bool and (item in groups.oo_nodes_to_config and item in groups.oo_masters_to_config)
+- name: Determine openshift_version to install on nodes
+ hosts: oo_nodes_to_config
+ any_errors_fatal: true
+ tasks:
+ - debug: var=hostvars[groups.oo_first_master.0].openshift.common.version
+ - debug: var=openshift.common.version
+ - name: Set openshift_version to match first master for new node
+ set_fact:
+ openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift.common.version }}"
+ when: openshift.common.version is not defined
+ - name: Set openshift_version to currently installed version
+ set_fact:
+ openshift_version: "{{ openshift.common.version }}"
+ when: openshift.common.version is defined
+ - debug: var=openshift_version
+
- name: Configure node instances
hosts: oo_containerized_master_nodes
serial: 1
vars:
- openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift.common.version }}"
openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
openshift_node_first_master_ip: "{{ hostvars[groups.oo_first_master.0].openshift.common.ip }}"
openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}"
@@ -124,15 +139,12 @@
}}"
when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and
openshift_generate_no_proxy_hosts | default(True) | bool }}"
- pre_tasks:
- - debug: var=hostvars[groups.oo_first_master.0].openshift.common.version
roles:
- openshift_node
- name: Configure node instances
hosts: oo_nodes_to_config:!oo_containerized_master_nodes
vars:
- openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift.common.version }}"
openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
openshift_node_first_master_ip: "{{ hostvars[groups.oo_first_master.0].openshift.common.ip }}"
openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}"