|
@@ -47,6 +47,8 @@
|
|
|
|
|
|
- name: Verify upgrade can proceed
|
|
- name: Verify upgrade can proceed
|
|
hosts: oo_masters_to_config
|
|
hosts: oo_masters_to_config
|
|
|
|
+ roles:
|
|
|
|
+ - openshift_facts
|
|
vars:
|
|
vars:
|
|
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
|
|
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
|
|
tasks:
|
|
tasks:
|
|
@@ -73,6 +75,8 @@
|
|
|
|
|
|
- name: Verify upgrade can proceed
|
|
- name: Verify upgrade can proceed
|
|
hosts: oo_nodes_to_config
|
|
hosts: oo_nodes_to_config
|
|
|
|
+ roles:
|
|
|
|
+ - openshift_facts
|
|
tasks:
|
|
tasks:
|
|
- name: Ensure Node is running
|
|
- name: Ensure Node is running
|
|
service:
|
|
service:
|
|
@@ -85,6 +89,10 @@
|
|
hosts: oo_masters_to_config:oo_nodes_to_config
|
|
hosts: oo_masters_to_config:oo_nodes_to_config
|
|
vars:
|
|
vars:
|
|
target_version: "{{ '1.2' if deployment_type == 'origin' else '3.1.1.900' }}"
|
|
target_version: "{{ '1.2' if deployment_type == 'origin' else '3.1.1.900' }}"
|
|
|
|
+ openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
|
|
|
|
+ handlers:
|
|
|
|
+ - include: ../../../../../roles/openshift_master/handlers/main.yml
|
|
|
|
+ - include: ../../../../../roles/openshift_node/handlers/main.yml
|
|
roles:
|
|
roles:
|
|
- openshift_cli
|
|
- openshift_cli
|
|
tasks:
|
|
tasks:
|
|
@@ -130,9 +138,19 @@
|
|
msg: Verifying the correct version was found
|
|
msg: Verifying the correct version was found
|
|
when: verify_upgrade_version is defined and g_new_version != verify_upgrade_version
|
|
when: verify_upgrade_version is defined and g_new_version != verify_upgrade_version
|
|
|
|
|
|
|
|
+ - include_vars: ../../../../../roles/openshift_master/vars/main.yml
|
|
|
|
+ when: inventory_hostname in groups.oo_masters_to_config
|
|
|
|
+
|
|
- name: Update systemd units
|
|
- name: Update systemd units
|
|
- script: ../files/ensure_system_units_have_version.sh {{ openshift.common.service_type }} {{ openshift.common.deployment_type }} {{ g_aos_versions.curr_version }}
|
|
|
|
- when: openshift.common.is_containerized | bool
|
|
|
|
|
|
+ include: ../../../../../roles/openshift_master/tasks/systemd_units.yml openshift_version=g_aos_versions.curr_version
|
|
|
|
+ when: inventory_hostname in groups.oo_masters_to_config
|
|
|
|
+
|
|
|
|
+ - include_vars: ../../../../../roles/openshift_node/vars/main.yml
|
|
|
|
+ when: inventory_hostname in groups.oo_nodes_to_config
|
|
|
|
+
|
|
|
|
+ - name: Update systemd units
|
|
|
|
+ include: ../../../../../roles/openshift_node/tasks/systemd_units.yml openshift_version=g_aos_versions.curr_version
|
|
|
|
+ when: inventory_hostname in groups.oo_nodes_to_config
|
|
|
|
|
|
# Note: the version number is hardcoded here in hopes of catching potential
|
|
# Note: the version number is hardcoded here in hopes of catching potential
|
|
# bugs in how g_aos_versions.curr_version is set
|
|
# bugs in how g_aos_versions.curr_version is set
|
|
@@ -143,6 +161,13 @@
|
|
- /etc/sysconfig/{{ openshift.common.service_type }}*
|
|
- /etc/sysconfig/{{ openshift.common.service_type }}*
|
|
when: verify_upgrade_version is defined
|
|
when: verify_upgrade_version is defined
|
|
|
|
|
|
|
|
+ - name: Verifying the image version is used in the systemd unit
|
|
|
|
+ shell: grep IMAGE_VERSION {{ item }}
|
|
|
|
+ with_items:
|
|
|
|
+ - /etc/systemd/system/openvswitch.service
|
|
|
|
+ - /etc/systemd/system/{{ openshift.common.service_type }}*.service
|
|
|
|
+ when: openshift.common.is_containerized | bool
|
|
|
|
+
|
|
- fail:
|
|
- fail:
|
|
msg: This playbook requires Origin 1.1 or later
|
|
msg: This playbook requires Origin 1.1 or later
|
|
when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.1','<')
|
|
when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.1','<')
|