diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-11-15 13:32:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 13:32:04 -0800 |
commit | acdd5e905be2605138143a970899672634492ecf (patch) | |
tree | a6b9fb03b8fe2c7e6acd98f16cf4602888607d1d /roles/openshift_master/tasks/upgrade.yml | |
parent | 763f604fccb71971cd6fda3ae63312233bbe1d4e (diff) | |
parent | 4877e1c21a26d2aba314e6272478005d12b7f14b (diff) | |
download | openshift-acdd5e905be2605138143a970899672634492ecf.tar.gz openshift-acdd5e905be2605138143a970899672634492ecf.tar.bz2 openshift-acdd5e905be2605138143a970899672634492ecf.tar.xz openshift-acdd5e905be2605138143a970899672634492ecf.zip |
Merge pull request #6084 from mgugino-upstream-stage/combine-master-upgrade
Automatic merge from submit-queue.
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.yml | 45 |
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 |