diff options
author | Jason DeTiberus <detiber@gmail.com> | 2017-01-24 10:50:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-24 10:50:02 -0500 |
commit | 14d118989cbca57c22c5b6e970067e0d9f9708bb (patch) | |
tree | 231a1f01544ed572968336a2ed745cc3cf34a4f3 /playbooks/common/openshift-cluster/upgrades | |
parent | 77656036572baa6abfefd7d467f25033d1fb81b0 (diff) | |
parent | 50ce715a704f77190a278bed2326cc567855181d (diff) | |
download | openshift-14d118989cbca57c22c5b6e970067e0d9f9708bb.tar.gz openshift-14d118989cbca57c22c5b6e970067e0d9f9708bb.tar.bz2 openshift-14d118989cbca57c22c5b6e970067e0d9f9708bb.tar.xz openshift-14d118989cbca57c22c5b6e970067e0d9f9708bb.zip |
Merge pull request #3101 from dgoodwin/pre-post-master-hook
Implement simple hooks pre/post master upgrade.
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml index 7f738ea0f..77b37cdc2 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml @@ -51,6 +51,8 @@ roles: - openshift_master_facts +# The main master upgrade play. Should handle all changes to the system in one pass, with +# support for optional hooks to be defined. - name: Upgrade master hosts: oo_masters_to_config vars: @@ -62,6 +64,14 @@ roles: - openshift_facts post_tasks: + + # 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_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 @@ -102,12 +112,26 @@ state: link when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists + # 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_master_upgrade_hook }}" + when: openshift_master_upgrade_hook is defined + - include: ../../openshift-master/restart_hosts.yml when: openshift.common.rolling_restart_mode == 'system' - 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 |