Pass the user list to user creation instead of the db list

Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
2026-05-09 19:47:58 -04:00
parent c29646f24a
commit 9db90c39bd
4 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -192,8 +192,8 @@
label: '{{ item.name }} will be {{ item.state }}'
- name: 'ensure mariadb users'
when:
- mariadb_db_list is defined
- mariadb_db_list is iterable
- mariadb_user_list is defined
- mariadb_user_list is iterable
community.mysql.mysql_user:
append_privs: '{{ item.append_privs | default(omit) }}'
attributes: '{{ item.attributes | default(omit) }}'
@@ -231,7 +231,7 @@
subtract_privs: '{{ item.subtract_privs | default(omit) }}'
tls_requires: '{{ item.tls_requires | default(omit) }}'
update_password: '{{ item.update_password | default(omit) }}'
loop: '{{ mariadb_db_list }}'
loop: '{{ mariadb_user_list }}'
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
...
+2
View File
@@ -130,3 +130,5 @@ template_list:
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service'
...
+2
View File
@@ -130,3 +130,5 @@ template_list:
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service'
...
+2
View File
@@ -130,3 +130,5 @@ template_list:
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service'
...