summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks/upgrade.yml
blob: f143673cfe31216025f078429c866f1fd6ac52cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- include_tasks: upgrade/rpm_upgrade.yml
  when: not openshift_is_containerized | bool

- include_tasks: upgrade/upgrade_scheduler.yml

# master_config_hook is passed in from upgrade play.
- include_tasks: "upgrade/{{ master_config_hook }}"
  when: master_config_hook is defined

- include_tasks: journald.yml

- include_tasks: 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