Add support for resource_limits when creating database users

This commit is contained in:
Kalle Kiviaho 2025-01-10 13:49:16 +01:00
parent 40f2b782dc
commit fc7808ace5
3 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,8 @@ mariadb_users: []
# host: 100.64.200.10
# password: password
# priv: "*.*:USAGE/db1.*:ALL"
# resource_limits:
# MAX_USER_CONNECTIONS: 20
# state: present|absent
# Replication

View File

@ -28,6 +28,13 @@ mariadb_users:
password: user2passwd
priv: "db2.*:ALL"
state: present
- name: user3
host: "%"
password: user3passwd
priv: "db2.*:ALL"
resource_limits:
MAX_USER_CONNECTIONS: 20
state: present
mariadb_replication_user:
- name: ReplicationUser

View File

@ -9,5 +9,6 @@
append_privs: "{{ item.append_privs | default('no') }}"
encrypted: "{{ item.encrypted | default('no') }}"
login_unix_socket: "{{ mariadb_unix_socket }}"
resource_limits: "{{ item.resource_limits | default({}) }}"
loop: "{{ mariadb_users }}"
no_log: true