This commit is contained in:
2023-04-28 04:25:32 -04:00
parent 81d2ea447a
commit ab0401f27b
34 changed files with 144 additions and 144 deletions

View File

@@ -1,5 +1,5 @@
- name: Install PostgreSQL
apt:
ansible.builtin.apt:
name: postgresql
state: present
@@ -23,19 +23,19 @@
register: postgresql_config
- name: Reload PostgreSQL
service:
ansible.builtin.service:
name: postgresql
state: reloaded
when: postgresql_hba.changed and not postgresql_config.changed
- name: Restart PostgreSQL
service:
ansible.builtin.service:
name: postgresql
state: restarted
when: postgresql_config.changed
- name: Allow database connections
ufw:
community.general.ufw:
rule: allow
port: "5432"
proto: tcp