ansible/playbooks/prod_db.yml

54 lines
2.0 KiB
YAML
Raw Normal View History

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
# Database servers
---
- hosts: psql1.desu.ltd
roles:
2020-12-24 09:19:12 -06:00
- role: backup
tags: [ backup ]
- role: geerlingguy.postgresql
vars:
postgresql_global_config_options:
- option: listen_addresses
2021-08-23 18:18:53 -05:00
value: 192.168.164.156,127.0.0.1
- option: max_connections
value: 60
- option: shared_buffers
value: 128MB
postgresql_hba_entries:
- { type: local, database: all, user: postgres, auth_method: trust }
2021-01-26 04:25:27 -06:00
- { type: local, database: all, user: all, auth_method: md5 }
- { type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: md5 }
- { type: host, database: all, user: all, address: '::1/128', auth_method: md5 }
# Used for internal access from other nodes
- { type: host, database: all, user: all, address: '192.168.0.0/16', auth_method: md5 }
postgresql_users:
- name: gitea-desultd
password: "{{ secret_gitea_db_pass }}"
2021-04-03 03:40:29 -05:00
- name: gulagbot-desultd
password: "{{ secret_gulagbot_db_pass }}"
2021-08-23 18:18:53 -05:00
- name: nagios
password: "{{ secret_postgresql_monitoring_password }}"
- name: netbox-desultd
password: "{{ secret_netbox_db_pass }}"
- name: nextcloud-desultd
password: "{{ secret_nextcloud_db_pass }}"
2021-06-03 19:11:50 -05:00
- name: peertube-cowfee
password: "{{ secret_peertube_db_pass }}"
2021-01-26 04:25:27 -06:00
- name: pleroma-cowfee
password: "{{ secret_pleroma_9iron_db_pass }}"
postgresql_databases:
- name: gitea-desultd
owner: gitea-desultd
2021-04-03 03:40:29 -05:00
- name: gulagbot-desultd
owner: gulagbot-desultd
- name: netbox-desultd
owner: netbox-desultd
- name: nextcloud-desultd
owner: nextcloud-desultd
- name: pleroma_cowfee
2021-03-11 09:39:04 -06:00
owner: pleroma-cowfee
2021-06-07 02:52:11 -05:00
- name: peertube
2021-06-03 19:11:50 -05:00
owner: peertube-cowfee
tags: [ db, psql ]