ansible-role-nextcloud/tasks/database.yml

22 lines
668 B
YAML
Raw Normal View History

2020-12-03 15:52:14 +01:00
---
2020-12-03 23:14:27 +01:00
- name: "Datenbank einrichten"
2020-12-03 15:52:14 +01:00
mysql_db:
name: '{{ nextcloud_mysql_db }}'
state: present
2020-12-31 02:30:14 +01:00
login_unix_socket: "{{ mysql_socket }}"
login_user: root
2020-12-03 15:52:14 +01:00
config_file: /etc/mysql/debian.cnf
delegate_to: "{{ nextcloud_database_host }}"
2020-12-03 23:14:27 +01:00
- name: "Datenbank Benutzer einrichten"
2020-12-03 15:52:14 +01:00
mysql_user:
name: "{{ nextcloud_mysql_user }}"
2021-01-31 03:00:26 +01:00
host: "{{ nextcloud_host }}"
2020-12-03 15:52:14 +01:00
password: "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters') }}"
2021-01-31 03:00:26 +01:00
priv: "{{ nextcloud_mysql_db }}.*:ALL"
2020-12-03 15:52:14 +01:00
state: present
2020-12-31 02:30:14 +01:00
login_unix_socket: "{{ mysql_socket }}"
login_user: root
2021-01-31 03:00:26 +01:00
update_password: on_create
2020-12-03 15:52:14 +01:00
delegate_to: "{{ nextcloud_database_host }}"