first push with basic outline

This commit is contained in:
tolerryan
2026-09-01 15:40:22 +00:00
parent 7ccf851913
commit 121fba9b66
21 changed files with 465 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
---
- name: Install postgresql
ansible.builtin.apt:
name:
- "postgresql-{{ postgres_version }}"
- python3-psycopg2
state: present
- name: Ensure postgresql is running and enabled
ansible.builtin.service:
name: postgresql
state: started
enabled: true
- name: Create databases
become_user: postgres
community.postgresql.postgresql_db:
name: "{{ item.name }}"
loop: "{{ postgres_databases }}"
- name: Create users
become_user: postgres
community.postgresql.postgresql_user:
name: "{{ item.name }}"
password: "{{ item.password }}"
loop: "{{ postgres_users }}"
no_log: true