Beginne Nextcloud-Rolle

This commit is contained in:
phil 2020-12-03 14:52:14 +00:00
commit db196d0567
15 changed files with 316 additions and 0 deletions

17
tasks/database.yml Normal file
View file

@ -0,0 +1,17 @@
---
- name: "Ensure nextcloud database exists"
mysql_db:
name: '{{ nextcloud_mysql_db }}'
state: present
config_file: /etc/mysql/debian.cnf
delegate_to: "{{ nextcloud_database_host }}"
# Todo: Formatierung des Nutzernamens und Zuordnung des hosts schlaegt fehl
- name: "Ensure database user exists and has all privileges"
mysql_user:
name: "{{ nextcloud_mysql_user }}"
password: "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters') }}"
priv: "{{ nextcloud_mysql_db }}.{{ inventory_hostname }}:ALL"
state: present
config_file: /etc/mysql/debian.cnf
delegate_to: "{{ nextcloud_database_host }}"