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:
Marcel Nijenhof
2021-05-06 14:46:09 +02:00
parent bf1c4d86e7
commit cff00f04c7
18 changed files with 143 additions and 89 deletions

View 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