From aa535603218491e21cb29d46666e65e3ff280405 Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Sat, 15 Jul 2023 06:46:09 -0700 Subject: [PATCH] Add postgres notes. --- README.md | 2 +- docs/POSTGRES.md | 46 +++++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ff536af..20bc69d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ansible Role: nextcloud -This Ansible Role installs a rootless [Nextcloud](https://github.com/nextcloud/docker) container using Podman. It is intended to be composed with separate roles for Podman and any database backend such as PostgreSQL or Mariadb. +This Ansible Role installs a rootless [Nextcloud](https://github.com/nextcloud/docker) container using Podman. It is intended to be composed with separate roles for Podman, database, and web proxy. ## Requirements diff --git a/docs/POSTGRES.md b/docs/POSTGRES.md index a431c90..940de5b 100644 --- a/docs/POSTGRES.md +++ b/docs/POSTGRES.md @@ -1,38 +1,38 @@ -# Mariadb +# PostgreSQL -This variation of the [original role](https://github.com/Tronde/ansible_role_deploy_nextcloud_with_mariadb_pod) is intended to be composed with another role that sets up the database. Here is an example using [fauust.mariadb](https://github.com/fauust/ansible-role-mariadb) +This variation of the [original role](https://github.com/Tronde/ansible_role_deploy_nextcloud_with_mariadb_pod) is intended to be composed with another role that sets up the database. Here is an example using [anxs.postgresql](https://github.com/ANXS/postgresql) ## Example Playbook ```yaml roles: - - fauust.mariadb + - anxs.postgresql ``` ## Example Variables ```yaml -mariadb_databases: +postgresql_users: - 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" + pass: "{{ lookup('ansible.builtin.env', 'wartortle_NEXTCLOUD_POSTGRES_PASSWORD') }}" + encrypted: yes state: present -mariadb_innodb_raw: | - innodb_buffer_pool_size = 512M - key_buffer_size = 10M - transaction_isolation=READ-COMMITTED +postgresql_databases: + - name: nextcloud + owner: nextcloud + state: present ``` -In this example, there are two users because both `localhost` and `%` (all-hosts wildcard) are [mutually exclusive](https://stackoverflow.com/q/10823854/9290). I am also using environment variables to separate secret stores from the repository. \ No newline at end of file + +In this example, there are two users because both `localhost` and `%` (all-hosts wildcard) are [mutually exclusive](https://stackoverflow.com/q/10823854/9290). I am also using environment variables to separate secret stores from the repository. + +## PG 15 + +I'm temporarily using this branch to get PG15: + +```yaml +# - src: https://github.com/ANXS/postgresql + - src: https://github.com/VladDm93/postgresql + version: postgres-14-15-support + name: anxs.postgresql +``` \ No newline at end of file