ansible-role-nextcloud/tasks/database.yml
2021-01-31 02:00:26 +00:00

21 lines
668 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 }}"
- name: "Datenbank Benutzer einrichten"
mysql_user:
name: "{{ nextcloud_mysql_user }}"
host: "{{ nextcloud_host }}"
password: "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters') }}"
priv: "{{ nextcloud_mysql_db }}.*:ALL"
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
update_password: on_create
delegate_to: "{{ nextcloud_database_host }}"