Allow external restart handler orchestration
Allow the playbook to define its own restart handlers in lieu of the restart tasks included with the role. This is ideal when upstream load balancer orchestration should occur around service restarts. Change-Id: Ia0a37527a73c940d4f164e147ce66c40a670c370
This commit is contained in:
parent
475d2d8ca2
commit
f876cf2926
@ -168,3 +168,6 @@ galera_ssl_address: "{{ ansible_host }}"
|
||||
# Setting the following variable to 'yes' will disable the PrivateDevices
|
||||
# setting in the systemd unit file for MariaDB on CentOS 7 hosts.
|
||||
galera_disable_privatedevices: no
|
||||
|
||||
# Allow the playbook to orchestrate service restart handlers
|
||||
galera_external_restart_handlers: no
|
||||
|
@ -29,6 +29,7 @@
|
||||
when:
|
||||
- not galera_running_and_bootstrapped | bool
|
||||
- ansible_pkg_mgr != "zypper"
|
||||
- not galera_external_restart_handlers | bool
|
||||
register: galera_restart
|
||||
until: galera_restart | success
|
||||
retries: 3
|
||||
@ -70,6 +71,7 @@
|
||||
- not galera_running_and_bootstrapped | bool
|
||||
- not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node
|
||||
- ansible_pkg_mgr == "zypper"
|
||||
- not galera_external_restart_handlers | bool
|
||||
|
||||
- name: "Ensure node is not in bootstrap mode"
|
||||
lineinfile:
|
||||
@ -81,6 +83,7 @@
|
||||
- not galera_running_and_bootstrapped | bool
|
||||
- (not galera_existing_cluster | bool) or (not inventory_hostname == galera_server_bootstrap_node)
|
||||
- ansible_pkg_mgr == "zypper"
|
||||
- not galera_external_restart_handlers | bool
|
||||
|
||||
- name: Restart mysql on SUSE
|
||||
service:
|
||||
@ -89,6 +92,7 @@
|
||||
when:
|
||||
- not galera_running_and_bootstrapped | bool
|
||||
- ansible_pkg_mgr == "zypper"
|
||||
- not galera_external_restart_handlers | bool
|
||||
register: galera_restart
|
||||
until: galera_restart | success
|
||||
retries: 3
|
||||
|
Loading…
Reference in New Issue
Block a user