diff options
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml index 9cec6ac4b..77b37cdc2 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml @@ -65,11 +65,12 @@ - openshift_facts post_tasks: - - debug: msg="Running pre-master upgrade hook {{ openshift_upgrade_pre_master_hook }}" - when: openshift_upgrade_pre_master_hook is defined + # Run the pre-upgrade hook if defined: + - debug: msg="Running master pre-upgrade hook {{ openshift_master_upgrade_pre_hook }}" + when: openshift_master_upgrade_pre_hook is defined - - include: "{{ openshift_upgrade_pre_master_hook }}" - when: openshift_upgrade_pre_master_hook is defined + - include: "{{ openshift_master_upgrade_pre_hook }}" + when: openshift_master_upgrade_pre_hook is defined - include: rpm_upgrade.yml component=master when: not openshift.common.is_containerized | bool @@ -111,12 +112,12 @@ state: link when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists - # NOTE: We run user provided hooks prior to restarting the system or services. - - debug: msg="Running post-master upgrade hook {{ openshift_upgrade_post_master_hook }}" - when: openshift_upgrade_post_master_hook 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 - - include: "{{ openshift_upgrade_post_master_hook }}" - when: openshift_upgrade_post_master_hook is defined + - include: "{{ openshift_master_upgrade_hook }}" + when: openshift_master_upgrade_hook is defined - include: ../../openshift-master/restart_hosts.yml when: openshift.common.rolling_restart_mode == 'system' @@ -124,6 +125,13 @@ - include: ../../openshift-master/restart_services.yml when: openshift.common.rolling_restart_mode == 'services' + # Run the post-upgrade hook if defined: + - debug: msg="Running master post-upgrade hook {{ openshift_master_upgrade_post_hook }}" + when: openshift_master_upgrade_post_hook is defined + + - include: "{{ openshift_master_upgrade_post_hook }}" + when: openshift_master_upgrade_post_hook is defined + - set_fact: master_update_complete: True |