Only manage databases and users from primary node

pull/45/head
Steven Wheeler 2022-05-09 16:40:59 -05:00
parent d957d31678
commit 357fec1ede
No known key found for this signature in database
GPG Key ID: FD77D8D821860ED3
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@
state: present state: present
login_unix_socket: "{{ mariadb_socket }}" login_unix_socket: "{{ mariadb_socket }}"
loop: "{{ mariadb_databases }}" loop: "{{ mariadb_databases }}"
when: not mariadb_use_galera or inventory_hostname == mariadb_galera_primary_node
- name: MYSQL_USER | Manages users... - name: MYSQL_USER | Manages users...
community.mysql.mysql_user: community.mysql.mysql_user:
@ -78,3 +79,4 @@
login_unix_socket: "{{ mariadb_socket }}" login_unix_socket: "{{ mariadb_socket }}"
loop: "{{ mariadb_users }}" loop: "{{ mariadb_users }}"
no_log: "{{ not mariadb_debug_role }}" no_log: "{{ not mariadb_debug_role }}"
when: not mariadb_use_galera or inventory_hostname == mariadb_galera_primary_node