--- - hosts: backend vars: apt: packages: - { package: "postgresql", state: present } - { package: "python3-psycopg2", state: present } - { package: "redis", state: present } - { package: "influxdb", state: present } systemd: services: - { name: "postgresql@{{ postgres.version }}-main", enabled: true, action: reloaded } - { name: "redis", enabled: true, action: restarted } - { name: "influxdb", enabled: true, action: restarted } overrides: - "influxdb" postgres: host: "{{ global.backend.postgres.host }}" port: "{{ global.backend.postgres.port }}" version: "12" # NOTE: If something fails due to the following statement make sure # the volume is mounted and the ansible cache is cleared! data: uuid: '28464b32-32f4-42e4-9625-1dddfb65e1a9' databases: - grafana - pleroma - gitea - murmur redis: host: "{{ global.backend.redis.host }}" port: "{{ global.backend.redis.port }}" data: uuid: '1245e7d9-1054-4e2f-816a-d38efbb47589' influxdb: storage: "/var/lib/influxdb" port: "{{ global.backend.influxdb.port }}" vault: roles: - "postgresql" mounts: - { uuid: '{{ postgres.data.uuid }}', dest: '/var/lib/postgresql', state: 'mounted', fstype: 'ext4' } - { uuid: '{{ redis.data.uuid }}', dest: '/var/lib/redis', state: 'mounted', fstype: 'ext4' } roles: - vault - mounts - apt - postgresql - influxdb - redis - systemd