summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks/upgrade.yml
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-11-09 17:48:27 -0500
committerMichael Gugino <mgugino@redhat.com>2017-11-09 17:48:27 -0500
commit4877e1c21a26d2aba314e6272478005d12b7f14b (patch)
treedffbc50aee9211685265d0a570156aa5103f778c /roles/openshift_master/tasks/upgrade.yml
parent7900f45d2d8ef566cf3f330a33364dd217a93c1d (diff)
downloadopenshift-4877e1c21a26d2aba314e6272478005d12b7f14b.tar.gz
openshift-4877e1c21a26d2aba314e6272478005d12b7f14b.tar.bz2
openshift-4877e1c21a26d2aba314e6272478005d12b7f14b.tar.xz
openshift-4877e1c21a26d2aba314e6272478005d12b7f14b.zip
Combine master upgrade play with role
Currently, there are plays importing tasks directly from openshift_master role. This has caused numerous bugs and code duplicaiton in the past. This commit combines the upgrade into openshift_master role utilizing include_role syntax.
Diffstat (limited to 'roles/openshift_master/tasks/upgrade.yml')
-rw-r--r--roles/openshift_master/tasks/upgrade.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/roles/openshift_master/tasks/upgrade.yml b/roles/openshift_master/tasks/upgrade.yml
new file mode 100644
index 000000000..92371921d
--- /dev/null
+++ b/roles/openshift_master/tasks/upgrade.yml
@@ -0,0 +1,45 @@
+---
+- include: upgrade/rpm_upgrade.yml
+ when: not openshift.common.is_containerized | bool
+
+- include: upgrade/upgrade_scheduler.yml
+
+# master_config_hook is passed in from upgrade play.
+- include: "upgrade/{{ master_config_hook }}"
+ when: master_config_hook is defined
+
+- include: journald.yml
+
+- include: systemd_units.yml
+
+- name: Check for ca-bundle.crt
+ stat:
+ path: "{{ openshift.common.config_base }}/master/ca-bundle.crt"
+ register: ca_bundle_stat
+ failed_when: false
+
+- name: Check for ca.crt
+ stat:
+ path: "{{ openshift.common.config_base }}/master/ca.crt"
+ register: ca_crt_stat
+ failed_when: false
+
+- name: Migrate ca.crt to ca-bundle.crt
+ command: mv ca.crt ca-bundle.crt
+ args:
+ chdir: "{{ openshift.common.config_base }}/master"
+ when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists
+
+- name: Link ca.crt to ca-bundle.crt
+ file:
+ src: "{{ openshift.common.config_base }}/master/ca-bundle.crt"
+ path: "{{ openshift.common.config_base }}/master/ca.crt"
+ state: link
+ when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists
+
+- name: Update oreg value
+ yedit:
+ src: "{{ openshift.common.config_base }}/master/master-config.yaml"
+ key: 'imageConfig.format'
+ value: "{{ oreg_url | default(oreg_url_master) }}"
+ when: oreg_url is defined or oreg_url_master is defined