Add Docker provider for Vagrant development environment

See merge request tildes-community/tildes-cf!1
This commit is contained in:
talklittle
2025-01-09 22:36:57 +00:00
committed by Deimos
parent 51a456bcf9
commit 49886af37e
43 changed files with 7087 additions and 107 deletions
+19 -10
View File
@@ -1,22 +1,31 @@
---
- 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: Remove postgresql from init.d (may conflict with systemd service)
file:
path: /etc/init.d/postgresql
state: absent
when: is_docker
- name: Update rc.d to reflect init.d removal
command:
cmd: update-rc.d postgresql remove
when: is_docker
- name: Start and enable PostgreSQL meta unit service
systemd_service:
name: postgresql
state: started
enabled: true
- name: Start and enable PostgreSQL cluster service
systemd_service:
name: postgresql@{{ postgresql_version }}-main
state: started
enabled: true
- name: Set configuration options in postgresql.conf
lineinfile:
path: /etc/postgresql/{{ postgresql_version }}/main/postgresql.conf