ansible-role-nextcloud/tasks/database.yml
2020-12-31 01:30:14 +00:00

21 lines
703 B
YAML

---
- name: "Datenbank einrichten"
mysql_db:
name: '{{ nextcloud_mysql_db }}'
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
config_file: /etc/mysql/debian.cnf
delegate_to: "{{ nextcloud_database_host }}"
# Todo: Formatierung des Nutzernamens und Zuordnung des hosts schlaegt fehl
- name: "Datenbank Benutzer einrichten"
mysql_user:
name: "{{ nextcloud_mysql_user }}"
password: "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters') }}"
priv: "{{ nextcloud_mysql_db }}.{{ inventory_hostname }}:ALL"
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
delegate_to: "{{ nextcloud_database_host }}"