diff --git a/defaults/main.yml b/defaults/main.yml index f5894480..3e8ed5fc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/handlers/main.yml b/handlers/main.yml index f62340c3..d8e67df7 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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