20 lines
647 B
YAML
20 lines
647 B
YAML
---
|
|
- name: "Database | Erstelle Datenbank | {{ item.name }}"
|
|
community.mysql.mysql_db:
|
|
name: "{{ item.database }}"
|
|
state: present
|
|
login_unix_socket: "{{ mysql_socket }}"
|
|
login_user: root
|
|
delegate_to: "{{ database_host }}"
|
|
|
|
- name: "Database | Richten Datenbank-Benutzer ein | {{ item.name }}"
|
|
community.mysql.mysql_user:
|
|
name: "{{ item.database }}"
|
|
host: "{{ inventory_hostname }}"
|
|
password: "{{ nextcloud_db_password }}"
|
|
priv: "{{ item.database }}.*:ALL"
|
|
state: present
|
|
login_unix_socket: "{{ mysql_socket }}"
|
|
login_user: root
|
|
update_password: on_create
|
|
delegate_to: "{{ database_host }}"
|