ansible-role-nextcloud/tasks/database.yml

18 lines
572 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
- name: "Database | Richte 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