Move Nextcloud to PostgreSQL

This commit is contained in:
Salt 2020-08-15 15:33:02 -05:00
parent af9596d9f0
commit 31d9aac7ef
3 changed files with 29 additions and 8 deletions

View File

@ -107,7 +107,9 @@ matrix:
63316265366238383038653034326661633163346462396663346563666134393232 63316265366238383038653034326661633163346462396663346563666134393232
# Nextcloud # Nextcloud
nextcloud: nextcloud:
db_password: !vault | db:
hostname: 172.31.47.215
pass: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
37633035633563646266346264333636393931323664313166633133653461646333643731636661 37633035633563646266346264333636393931323664313166633133653461646333643731636661
3966666665396239346662613764353333393038663762340a313236396331623061376462356437 3966666665396239346662613764353333393038663762340a313236396331623061376462356437

View File

@ -2,4 +2,3 @@
allow_duplicates: no allow_duplicates: no
dependencies: dependencies:
- role: apache-php - role: apache-php
- role: mysql

View File

@ -8,7 +8,27 @@
name: name:
- php-imagick - php-imagick
- php-redis - php-redis
- php-pgsql
notify: restart apache notify: restart apache
- name: Set up PostgreSQL
block:
- name: Create DB user
postgresql_user:
name: nextcloud
password: "{{ nextcloud.db.pass }}"
login_host: "{{ nextcloud.db.hostname }}"
login_user: "{{ psql.ansible.user }}"
login_password: "{{ psql.ansible.pass }}"
- name: Create DB
postgresql_db:
name: nextcloud
owner: nextcloud
encoding: UNICODE
login_host: "{{ nextcloud.db.hostname }}"
login_user: "{{ psql.ansible.user }}"
login_password: "{{ psql.ansible.pass }}"
when: nextcloud.db.hostname is defined
tags: [ postgresql ]
- name: Set up MySQL - name: Set up MySQL
block: block:
- name: Create database - name: Create database