Skip to content

Commit

Permalink
rolling restart when certs changed
Browse files Browse the repository at this point in the history
  • Loading branch information
fhufenreuter authored and eRadical committed Mar 10, 2024
1 parent c78ec4b commit 6232144
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tasks/setup_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
with_dict: "{{ mariadb_tls_files }}"
become: true
no_log: true
register: _mariadb_galera_cluster_newcerts
when:
- mariadb_tls_files is defined
- mariadb_tls_files | length == 3
Expand Down Expand Up @@ -93,7 +94,8 @@
with_items: "{{ galera_mysql_first_node }}"
when: >
galera_cluster_configured.stat.exists and
_mariadb_galera_cluster_reconfigured.changed
(_mariadb_galera_cluster_reconfigured.changed or
_mariadb_galera_cluster_newcerts.changed)
- name: setup_cluster | cluster rolling restart - apply config changes (other nodes)
ansible.builtin.include_tasks: manage_node_state.yml
Expand All @@ -102,7 +104,8 @@
with_items: "{{ ansible_play_hosts | difference(galera_mysql_first_node) }}"
when: >
galera_cluster_configured.stat.exists and
_mariadb_galera_cluster_reconfigured.changed
(_mariadb_galera_cluster_reconfigured.changed or
_mariadb_galera_cluster_newcerts.changed)
# Offline (re)configuration of glaera cluster settings - cluster bootstrap
- name: setup_cluster | cluster bootstrap - stopping mysql to (re)configure cluster (other nodes)
Expand All @@ -122,7 +125,7 @@
not galera_cluster_configured.stat.exists
- name: setup_cluster | custer bootstrap - killing lingering mysql processes to ensure mysql is stopped
ansible.builtin.command: "pkill {{ mariadb_systemd_service_name }}" # noqa ignore-errors
ansible.builtin.command: "pkill {{ mariadb_systemd_service_name }}" # noqa ignore-errors
become: true
ignore_errors: true
when: not galera_cluster_configured.stat.exists
Expand Down

0 comments on commit 6232144

Please sign in to comment.