modcloth.repmgr
repmgr
This role installs and configures repmgr for Postgresql replication
Requirements
Assumes PostgreSQL is already installed and running.
You should have the include_dir directive set in your postgresql.conf. See the repmgr_postgresql_conf default.
Role Variables
See defaults/main.yml
Dependencies
None
Usage
In the playbook for the master:
- host: servers
roles:
- role: modcloth.repmgr
repmgr_is_master: yes
repmgr_node_id: 1
In the playbook for the standby:
- hosts: servers
roles:
- role: modcloth.repmgr
repmgr_node_id: 2
Tricks and Tips
You will need to create a repmgr user on your master database with
appropriate permissions. This two things.
- Create a database use
repmgrwith the permissionsSUPERUSER,REPLICATION,LOGIN - Add an entry to the
pg_hba.conffile giving explicit access to the replication database to both therepmgrand thepostgresusers
# pg_hba.conf
host replication repmgr 192.168.0.0/16 trust
host replication repmgr 10.0.0.0/8 trust
host replication postgres 192.168.0.0/16 trust
host replication postgres 10.0.0.0/8 trust
License
MIT
Author Information
ModCloth Inc.
Install
ansible-galaxy install modcloth.repmgrLicense
mit
Downloads
98
Owner
eTailer
