summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-node
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-05-25 14:54:59 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-05-25 14:54:59 -0300
commit58f920e854180cd9a8754fee82712fa8dd7b1f34 (patch)
tree75e98c304e13e2538c8b77271901d6fa7fd1119d /playbooks/common/openshift-node
parent0fc4aae17527d8d51b3d3848ccbbf42c6d03fac9 (diff)
downloadopenshift-58f920e854180cd9a8754fee82712fa8dd7b1f34.tar.gz
openshift-58f920e854180cd9a8754fee82712fa8dd7b1f34.tar.bz2
openshift-58f920e854180cd9a8754fee82712fa8dd7b1f34.tar.xz
openshift-58f920e854180cd9a8754fee82712fa8dd7b1f34.zip
Preserve node versions on re-run.
Diffstat (limited to 'playbooks/common/openshift-node')
-rw-r--r--playbooks/common/openshift-node/config.yml20
1 files changed, 16 insertions, 4 deletions
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 }}"