ansible-role-nextcloud/docs/MARIADB.md

1.0 KiB

Mariadb

This variation of the original role is intended to be composed with another role that sets up the database. Here is an example using fauust.mariadb

Example Playbook

  roles:
    - fauust.mariadb

Example Variables

mariadb_databases:
  - name: nextcloud
    collation: utf8_general_ci
    encoding: utf8
    replicate: false

mariadb_users:
  - name: nextcloud
    host: localhost
    password: "{{ lookup('ansible.builtin.env', 'NEXTCLOUD_MARIADB') }}"
    priv: "nextcloud.*:ALL"
    state: present
  - name: nextcloud
    host: '%'
    password: "{{ lookup('ansible.builtin.env', 'NEXTCLOUD_MARIADB') }}"
    priv: "nextcloud.*:ALL"
    state: present

In this example, there are two users because both localhost and % (all-hosts wildcard) are mutually exclusive. I am also using environment variables to separate secret stores from the repository.