Fix wrong privs in case of list

This commit is contained in:
camille.prugnard
2025-12-19 09:54:30 +01:00
parent 29efd6bedb
commit c2693caf0e
2 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ Installs and manages Percona Server on Debian.
## Requirements ## Requirements
None. - Ansible 10+
## Role Variables ## Role Variables

View File

@@ -4,7 +4,7 @@
name: "{{ item.name }}" name: "{{ item.name }}"
password: "{{ item.password }}" password: "{{ item.password }}"
host: "{{ item.host | default('%') }}" host: "{{ item.host | default('%') }}"
priv: "{{ item.priv | default('*.*:USAGE') }}" priv: "{{ (item.priv | join('/')) if item.priv is iterable and item.priv is not string else (item.priv | default('*.*:USAGE')) }}"
plugin: "mysql_native_password" plugin: "mysql_native_password"
state: present state: present
login_user: root login_user: root
@@ -16,7 +16,7 @@
mysql_user: mysql_user:
name: "{{ item.name }}" name: "{{ item.name }}"
host: "{{ item.host | default('%') }}" host: "{{ item.host | default('%') }}"
priv: "{{ item.priv | default('*.*:USAGE') }}" priv: "{{ (item.priv | join('/')) if item.priv is iterable and item.priv is not string else (item.priv | default('*.*:USAGE')) }}"
plugin: caching_sha2_password plugin: caching_sha2_password
plugin_auth_string: "{{ item.password }}" plugin_auth_string: "{{ item.password }}"
salt: "{{ percona_caching_sha2_password_salt }}" salt: "{{ percona_caching_sha2_password_salt }}"