Fix Galera bootstrap issues
parent
239ce0dd6c
commit
c2f1ef522a
|
@ -122,6 +122,8 @@ mariadb_upstream_version: '10.6'
|
|||
# -------------------------------------
|
||||
# Galera
|
||||
# -------------------------------------
|
||||
mariadb_galera_sst_user: galera
|
||||
mariadb_galera_sst_password: galera
|
||||
mariadb_galera_resetup: false
|
||||
mariadb_wsrep_node_address: false # Set primary node IP
|
||||
mariadb_galera_members: []
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
register: bootstrap_run
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
|
||||
- name: MYSQL_USER | Manage SST user...
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ mariadb_galera_sst_user }}"
|
||||
password: "{{ mariadb_galera_sst_password }}"
|
||||
priv: "*.*:RELOAD,LOCK TABLES,REPLICATION CLIENT,PROCESS"
|
||||
host: localhost
|
||||
state: present
|
||||
no_log: "{{ not mariadb_debug_role }}"
|
||||
when: mariadb_galera_sst_user != ''
|
||||
|
||||
when: not s.stat.exists or mariadb_galera_resetup
|
||||
|
||||
- name: COMMAND | Create Bootstrap mark
|
||||
|
|
|
@ -33,3 +33,10 @@
|
|||
state: started
|
||||
|
||||
when: debiancnf.stdout != ondc.stdout
|
||||
|
||||
- name: SERVICE | Restart MariaDB if needed
|
||||
ansible.builtin.service:
|
||||
name: "{{ mariadb_service_name }}"
|
||||
state: restarted
|
||||
when:
|
||||
galeraconfig and bootstrap_run is defined and bootstrap_run['changed']
|
||||
|
|
Loading…
Reference in New Issue