https://github.com/dockpack/base_postgres
🐘 Ansible role to install PostgreSQL on one or two machines (primary/replica).
https://github.com/dockpack/base_postgres
database hacktoberfest postgresql postgresql-database sql
Last synced: about 1 month ago
JSON representation
🐘 Ansible role to install PostgreSQL on one or two machines (primary/replica).
- Host: GitHub
- URL: https://github.com/dockpack/base_postgres
- Owner: dockpack
- License: mit
- Created: 2017-07-20T08:03:17.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2023-08-18T22:09:50.000Z (almost 3 years ago)
- Last Synced: 2025-01-10T10:57:52.063Z (over 1 year ago)
- Topics: database, hacktoberfest, postgresql, postgresql-database, sql
- Language: Dockerfile
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PostgreSQL primary/replica
=========
PostgreSQL 12 on one or two RHEL/Centos boxes.
Requirements
------------
Internet. RedHat Linux 7 or 8, or Centos 7 or 8.
This role wast tested with molecule:
Role Variables
--------------
The first three vars you must set, the others are optional.
1. `base_postgres_mip` # This is the ip address of the primary/master database
1. `base_postgres_user` # This is your user
1. `base_postgres_pass` # This is your password
1. `base_postgres_net` # 192.168.20.0/24 This is the subnet granted access
1. `base_postgres_role` # With 2 hosts the one is primary, the other replica
1. `base_postgres_sip` # The ip address of the replica when you use 2 databases
Dependencies
------------
RedHat-like Linux
Example
----------------
# Inventory
[dataservers]
data1 role=primary
data2 role=replica
# Playbook for dbserver tier
```yaml
---
- name: Database deployment
hosts: dbservers
become: yes
gather_facts: True
vars_files:
- dbservers/secrets.yml
pre_tasks:
- include: dbservers/pre_tasks.yml
roles:
- dockpack.base_postgres_role
- rsyslog
tasks: []
post_tasks:
- include: dbservers/post_tasks.yml
```
License
-------
BSD, MIT
Author Information
------------------
http://twitter.com/bbaassssiiee
https://github.com/dockpack/base_postgres_role.git