fix: change secret of mysql

This commit is contained in:
ibuler
2026-05-19 15:50:45 +08:00
parent d0df1265d0
commit 9a5c965c0a

View File

@@ -37,8 +37,10 @@
client_cert: "{{ ssl_cert if check_ssl and ssl_cert | length > 0 else omit }}"
client_key: "{{ ssl_key if check_ssl and ssl_key | length > 0 else omit }}"
name: "{{ account.username }}"
password: "{{ account.secret }}"
host: "%"
plugin: "{{ 'caching_sha2_password' if ('MariaDB' not in db_info.version.full and (db_info.version.full is version('8.0', '>='))) else omit }}"
plugin_auth_string: "{{ account.secret if ('MariaDB' not in db_info.version.full and (db_info.version.full is version('8.0', '>='))) else omit }}"
password: "{{ account.secret if ('MariaDB' in db_info.version.full or (db_info.version.full is version('8.0', '<'))) else omit }}"
priv: "{{ omit if db_name == '' else db_name + '.*:ALL' }}"
append_privs: "{{ db_name != '' | bool }}"
ignore_errors: true