Browse Source

Merge pull request #3726 from sdodson/oreg_url_on_upgrade

Merged by openshift-bot
OpenShift Bot 8 years ago
parent
commit
763831e734

+ 8 - 0
playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml

@@ -64,6 +64,7 @@
     static: yes
   roles:
   - openshift_facts
+  - lib_utils
   post_tasks:
 
   # Run the pre-upgrade hook if defined:
@@ -113,6 +114,13 @@
       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 }}"
+    when: oreg_url is defined
+
   # Run the upgrade hook prior to restarting services/system if defined:
   - debug: msg="Running master upgrade hook {{ openshift_master_upgrade_hook }}"
     when: openshift_master_upgrade_hook is defined

+ 7 - 0
roles/openshift_node_upgrade/tasks/main.yml

@@ -73,6 +73,13 @@
 # Mandatory Docker restart, ensure all containerized services are running:
 - include: docker/restart.yml
 
+- name: Update oreg value
+  yedit:
+    src: "{{ openshift.common.config_base }}/node/node-config.yaml"
+    key: 'imageConfig.format'
+    value: "{{ oreg_url }}"
+  when: oreg_url is defined
+
 - name: Restart rpm node service
   service:
     name: "{{ openshift.common.service_type }}-node"