Eerste grote update:
- Wissen standaard accounts - Zetten root password - Aanmaken databases - Aanmaken gebruikers per database - Lege files klaar zetten voor backup, slave, config
This commit is contained in:
11
roles/mysql/tasks/mysql_db_users.yml
Normal file
11
roles/mysql/tasks/mysql_db_users.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Create users
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ user[0].name }}"
|
||||
password: "{{ user[0].password }}"
|
||||
state: "{{ user[0].state|default(db.state)|default('present') }}"
|
||||
host: "{{ user[1] }}"
|
||||
priv: "{{db.name}}.*:{{ user[0].priv|default('ALL') }}"
|
||||
loop: "{{ db.users|product(db_clients)|list }}"
|
||||
loop_control:
|
||||
loop_var: user
|
Reference in New Issue
Block a user