db-koji02: create vm and config files for hot standby kojidb.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2019-10-17 19:01:50 +00:00 committed by Pierre-Yves Chibon
parent f01ae28b8c
commit 9747e55c72
5 changed files with 72 additions and 0 deletions

View file

@ -90,13 +90,24 @@
- config
- postgresql
- name: postgresql recover.conf template (standby only)
template: dest=/var/lib/pgsql/data/resovery.conf src=recovery.conf
when: inventory_hostname.startswith('db-koji02')
notify:
- restart postgresql
tags:
- config
- postgresql
- name: Ensure postgres has a place to backup to
file: dest=/backups state=directory owner=postgres
when: inventory_hostname.startswith('db-koji02')
tags:
- postgresql
- name: Copy over backup scriplet
copy: src=backup-database dest=/usr/local/bin/backup-database mode=0755
when: inventory_hostname.startswith('db-koji02')
tags:
- postgresql