Switch to Debian 10 and Ansible

This changes the site to run on Debian 10 instead of Ubuntu 16.04. It
also fully converts the previous Salt setup to use Ansible instead.

Most of this was a relatively straightforward conversion, and it should
be very close to equivalent. One notable difference is that I removed
the setup for the "monitoring" server, since I wasn't confident that the
way of setting up self-hosted Sentry and Grafana was working any more.
I'll look to re-add that at some point, but it's not urgent.
This commit is contained in:
Deimos
2021-06-25 00:08:58 -06:00
parent d91ecf910f
commit 4cc100ab02
158 changed files with 1495 additions and 2075 deletions
+27
View File
@@ -0,0 +1,27 @@
---
- name: Add APT key for PostgreSQL repository
apt_key:
url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
- name: Add PostgreSQL APT repository
apt_repository:
repo: deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main
- name: Install PostgreSQL
apt:
name: postgresql-{{ postgresql_version }}
- name: Start and enable PostgreSQL service
service:
name: postgresql
state: started
enabled: true
- name: Set configuration options in postgresql.conf
lineinfile:
path: /etc/postgresql/{{ postgresql_version }}/main/postgresql.conf
regexp: "^#?{{ item.key }} ?="
line: "{{ item.key }} = {{ item.value }}"
loop: "{{ _postgresql_settings | combine(postgresql_settings) | dict2items }}"
notify:
- Restart postgresql