You've already forked percona
enhance passwords management and add default options
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
---
|
||||
- name: percona | create users
|
||||
- name: percona | create legacy users
|
||||
mysql_user:
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
host: "{{ item.host | default('%') }}"
|
||||
priv: "{{ item.priv | default('*.*:USAGE') }}"
|
||||
plugin: "mysql_native_password"
|
||||
state: present
|
||||
login_user: root
|
||||
login_password: "{{ percona_root_password }}"
|
||||
loop: "{{ percona_users }}"
|
||||
when: item.auth_plugin is defined and item.auth_plugin == 'mysql_native_password'
|
||||
|
||||
- name: percona | create users
|
||||
mysql_user:
|
||||
name: "{{ item.name }}"
|
||||
host: "{{ item.host | default('%') }}"
|
||||
priv: "{{ item.priv | default('*.*:USAGE') }}"
|
||||
plugin: caching_sha2_password
|
||||
plugin_auth_string: "{{ item.password }}"
|
||||
salt: "{{ percona_caching_sha2_password_salt }}"
|
||||
state: present
|
||||
login_user: root
|
||||
login_password: "{{ percona_root_password }}"
|
||||
loop: "{{ percona_users }}"
|
||||
when: item.auth_plugin is not defined or item.auth_plugin == 'caching_sha2_password'
|
||||
|
||||
Reference in New Issue
Block a user