2020-12-21 01:18:32 -06:00
|
|
|
#!/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
|
|
|
|
vars:
|
2020-12-24 09:36:39 -06:00
|
|
|
backup_script: s3pgdump
|
2020-12-24 09:19:12 -06:00
|
|
|
tags: [ backup ]
|
2021-01-17 00:53:48 -06:00
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- postgresql
|
|
|
|
tags: [ motd ]
|
2020-12-21 01:18:32 -06:00
|
|
|
- role: postgresql
|
|
|
|
vars:
|
|
|
|
postgresql_global_config_options:
|
|
|
|
- option: listen_addresses
|
|
|
|
value: 192.168.164.156
|
|
|
|
postgresql_hba_entries:
|
|
|
|
- { type: local, database: all, user: postgres, auth_method: peer }
|
2021-01-26 04:25:27 -06:00
|
|
|
- { type: local, database: all, user: all, auth_method: md5 }
|
2020-12-21 01:18:32 -06:00
|
|
|
- { 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:
|
2020-12-29 09:06:08 -06:00
|
|
|
- name: gitea-desultd
|
2020-12-21 01:18:32 -06:00
|
|
|
password: "{{ secret_gitea_db_pass }}"
|
2021-04-03 03:40:29 -05:00
|
|
|
- name: gulagbot-desultd
|
|
|
|
password: "{{ secret_gulagbot_db_pass }}"
|
2020-12-29 09:06:08 -06:00
|
|
|
- name: nextcloud-desultd
|
2020-12-21 01:18:32 -06:00
|
|
|
password: "{{ secret_nextcloud_db_pass }}"
|
2021-01-26 04:25:27 -06:00
|
|
|
- name: pleroma-cowfee
|
|
|
|
password: "{{ secret_pleroma_9iron_db_pass }}"
|
2020-12-21 01:18:32 -06:00
|
|
|
postgresql_databases:
|
2020-12-29 09:06:08 -06:00
|
|
|
- name: gitea-desultd
|
|
|
|
owner: gitea-desultd
|
2021-04-03 03:40:29 -05:00
|
|
|
- name: gulagbot-desultd
|
|
|
|
owner: gulagbot-desultd
|
2020-12-29 09:06:08 -06:00
|
|
|
- name: nextcloud-desultd
|
|
|
|
owner: nextcloud-desultd
|
2021-03-10 11:29:49 -06:00
|
|
|
- name: pleroma_cowfee
|
2021-03-11 09:39:04 -06:00
|
|
|
owner: pleroma-cowfee
|
2020-12-21 01:18:32 -06:00
|
|
|
tags: [ db, psql ]
|
2020-12-27 12:07:55 -06:00
|
|
|
- hosts: psql1.9iron.club
|
|
|
|
roles:
|
|
|
|
- role: backup
|
|
|
|
vars:
|
|
|
|
backup_script: s3pgdump
|
|
|
|
tags: [ backup ]
|
2021-01-17 00:53:48 -06:00
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- postgresql
|
|
|
|
tags: [ motd ]
|
2020-12-27 12:07:55 -06:00
|
|
|
- role: postgresql
|
|
|
|
vars:
|
|
|
|
postgresql_hba_entries:
|
|
|
|
- { type: local, database: all, user: postgres, auth_method: peer }
|
2021-01-26 04:25:27 -06:00
|
|
|
- { type: local, database: all, user: all, auth_method: md5 }
|
2020-12-27 12:07:55 -06:00
|
|
|
- { 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 }
|
|
|
|
- { type: host, database: all, user: all, address: '172.31.0.0/16', auth_method: md5 }
|
2020-12-27 13:14:05 -06:00
|
|
|
postgresql_users:
|
|
|
|
- name: gitea
|
|
|
|
password: "{{ secret_gitea_9iron_db_pass }}"
|
|
|
|
- name: nextcloud
|
|
|
|
password: "{{ secret_nextcloud_9iron_db_pass }}"
|
2021-01-20 19:25:16 -06:00
|
|
|
- name: onlyoffice-9iron
|
|
|
|
password: "{{ secret_onlyoffice_9iron_db_pass }}"
|
2020-12-27 13:15:59 -06:00
|
|
|
- name: pleroma
|
|
|
|
password: "{{ secret_pleroma_9iron_db_pass }}"
|
2020-12-27 13:18:26 -06:00
|
|
|
- name: matrix
|
|
|
|
password: "{{ secret_matrix_9iron_db_pass }}"
|
2020-12-27 13:14:05 -06:00
|
|
|
postgresql_databases:
|
|
|
|
- name: gitea
|
|
|
|
lc_collate: C.UTF-8
|
|
|
|
lc_ctype: C.UTF-8
|
|
|
|
owner: gitea
|
|
|
|
- name: nextcloud
|
|
|
|
lc_collate: C.UTF-8
|
|
|
|
lc_ctype: C.UTF-8
|
|
|
|
owner: nextcloud
|
2021-01-20 19:25:16 -06:00
|
|
|
- name: onlyoffice-9iron
|
|
|
|
lc_collate: C.UTF-8
|
|
|
|
lc_ctype: C.UTF-8
|
|
|
|
owner: onlyoffice-9iron
|
2020-12-27 13:15:59 -06:00
|
|
|
- name: pleroma
|
|
|
|
lc_collate: C.UTF-8
|
|
|
|
lc_ctype: C.UTF-8
|
|
|
|
owner: pleroma
|
2020-12-27 13:18:26 -06:00
|
|
|
- name: matrix
|
|
|
|
lc_collate: C
|
|
|
|
lc_ctype: C
|
|
|
|
owner: matrix
|
2020-12-27 12:07:55 -06:00
|
|
|
tags: [ db, psql ]
|