ansible-role-nextcloud/tasks/database.yml

22 lines
705 B
YAML
Raw Normal View History

2020-12-03 15:52:14 +01:00
---
- name: "database: {{ instance.domain }}: Datenbank einrichten"
2020-12-03 15:52:14 +01:00
mysql_db:
name: "{{ instance.database }}"
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
2020-12-03 15:52:14 +01:00
config_file: /etc/mysql/debian.cnf
2021-06-26 01:02:13 +02:00
delegate_to: "{{ database_host }}"
2020-12-03 15:52:14 +01:00
- name: "database: {{ instance.domain }}: Benutzer einrichten"
2020-12-03 15:52:14 +01:00
mysql_user:
name: "{{ instance.database }}"
host: "{{ inventory_hostname }}"
password: "{{ lookup('password', '/tmp/nc_db_password chars=ascii_letters') }}"
priv: "{{ instance.database }}.*: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
2021-06-26 01:02:13 +02:00
delegate_to: "{{ database_host }}"