ansible-role-nextcloud/tasks/database.yml

20 lines
626 B
YAML

---
- name: "database | {{ instance.name }} | Datenbank einrichten"
mysql_db:
name: "{{ instance.database }}"
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
delegate_to: "{{ database_host }}"
- name: "database | {{ instance.name }} | Benutzer einrichten"
mysql_user:
name: "{{ instance.database }}"
host: "{{ inventory_hostname }}"
password: "{{ nextcloud_db_password }}"
priv: "{{ instance.database }}.*:ALL"
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
update_password: on_create
delegate_to: "{{ database_host }}"