From b5d4646724a745a77c98503a53707c3f7cd1030f Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 27 Dec 2020 12:07:55 -0600 Subject: [PATCH] Enroll psql1.9iron.club OH BOY HERE WE GO --- inventory/hosts.yml | 1 + playbooks/db.yml | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/inventory/hosts.yml b/inventory/hosts.yml index 9c487ea..d760820 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -11,6 +11,7 @@ all: lap-s76-lemp9-0.desu.ltd: db: hosts: + psql1.9iron.club: psql1.desu.ltd: web: hosts: diff --git a/playbooks/db.yml b/playbooks/db.yml index 01aece5..d546a1d 100755 --- a/playbooks/db.yml +++ b/playbooks/db.yml @@ -7,8 +7,6 @@ - role: backup vars: backup_script: s3pgdump - backup_s3backup_list_extra: - - /var/lib/postgresql become: yes tags: [ backup ] - role: postgresql @@ -35,3 +33,20 @@ owner: nextcloud become: yes tags: [ db, psql ] +- hosts: psql1.9iron.club + roles: + - role: backup + vars: + backup_script: s3pgdump + become: yes + tags: [ backup ] + - role: postgresql + vars: + postgresql_hba_entries: + - { type: local, database: all, user: postgres, auth_method: peer } + - { type: local, database: all, user: all, auth_method: peer } + - { type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: md5 } + - { type: host, database: all, user: all, address: '::1/128', auth_method: md5 } + - { type: host, database: all, user: all, address: '172.31.0.0/16', auth_method: md5 } + become: yes + tags: [ db, psql ]