This repository has been archived on 2020-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
ansible/backend.yml

57 lines
2.2 KiB
YAML
Raw Normal View History

---
- hosts: backend
vars:
2020-05-27 17:38:21 +00:00
apt:
packages:
- { package: "postgresql", state: present }
- { package: "python3-psycopg2", state: present }
- { package: "redis", state: present }
- { package: "influxdb", state: present }
systemd:
services:
2020-05-31 18:27:29 +00:00
- { name: "postgresql@{{ postgres.version }}-main", enabled: true, action: reloaded }
2020-07-12 16:34:42 +00:00
- { name: "redis-server", enabled: true, action: restarted }
- { name: "influxdb", enabled: true, action: restarted }
overrides:
- "influxdb"
2020-07-12 16:34:42 +00:00
- "postgresql@"
- "redis-server"
postgres:
host: "{{ global.backend.postgres.host }}"
port: "{{ global.backend.postgres.port }}"
2020-05-31 18:27:29 +00:00
version: "12"
# NOTE: If something fails due to the following statement make sure
# the volume is mounted and the ansible cache is cleared!
data:
2020-07-12 16:34:42 +00:00
path: "/dbs/postgres"
#uuid: '28464b32-32f4-42e4-9625-1dddfb65e1a9'
databases:
- grafana
- pleroma
- gitea
- murmur
redis:
host: "{{ global.backend.redis.host }}"
port: "{{ global.backend.redis.port }}"
2020-05-31 18:27:29 +00:00
data:
2020-07-12 16:34:42 +00:00
#uuid: '1245e7d9-1054-4e2f-816a-d38efbb47589'
path: "/dbs/redis"
influxdb:
data:
path: "/var/lib/influxdb"
uuid: "ac0740fe-abab-4bda-84ef-e39e0bd823b3"
port: "{{ global.backend.influxdb.port }}"
2020-05-28 15:08:29 +00:00
vault:
2020-05-31 18:27:29 +00:00
roles:
- "postgresql"
mounts:
- { uuid: '{{ influxdb.data.uuid }}', dest: '{{ influxdb.data.path }}', state: 'mounted', fstype: 'ext4' }
roles:
2020-05-28 15:08:29 +00:00
- vault
2020-05-31 18:27:29 +00:00
- mounts
- apt
- postgresql
- influxdb
- redis
- systemd