ansible-role-nextcloud/tasks/database.yml

21 lines
665 B
YAML

---
- name: "database: {{ instance.domain }}: Datenbank einrichten"
mysql_db:
name: "{{ instance.database }}"
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
config_file: /etc/mysql/debian.cnf
delegate_to: "{{ database_host }}"
- name: "database: {{ instance.domain }}: 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 }}"