Add simplified PostgreSQL infrastructure role for database services
- Provides PostgreSQL server as shared database infrastructure - Follows KISS principle with only essential configuration (11 variables vs 45 originally) - Implements maximum security with Unix socket-only superuser access - Uses scram-sha-256 authentication for application users - Includes SystemD security hardening - Applications manage their own databases/users via this infrastructure - Production-ready with data checksums and localhost-only access
This commit is contained in:
18
roles/postgresql/handlers/main.yml
Normal file
18
roles/postgresql/handlers/main.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
# PostgreSQL Role Handlers
|
||||
|
||||
- name: reload systemd
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: restart postgresql
|
||||
systemd:
|
||||
name: postgresql
|
||||
state: restarted
|
||||
when: postgresql_service_state == "started"
|
||||
|
||||
- name: reload postgresql
|
||||
systemd:
|
||||
name: postgresql
|
||||
state: reloaded
|
||||
when: postgresql_service_state == "started"
|
||||
Reference in New Issue
Block a user