Go to file
2024-11-03 17:20:52 +03:00
inventory first commit 2023-08-11 10:01:30 +03:00
vars update vars 2024-11-03 17:20:52 +03:00
.gitignore first commit 2023-08-11 10:01:30 +03:00
ansible-roles.yaml first commit 2023-08-11 10:01:30 +03:00
ansible.cfg update ansible.cfg 2023-08-11 10:23:57 +03:00
postgresql.yaml fix unneeded spaces 2023-09-30 21:21:24 +03:00
README.md first commit 2023-08-11 10:01:30 +03:00
requirements.txt first commit 2023-08-11 10:01:30 +03:00
requirements.yaml cleanup role requirements 2024-05-26 18:05:25 +03:00

Deploy PostgreSQL

Install ansible and requirements in virtualenv

mkvirtualenv ansible-7.6.0
pip install -r requirements.txt
deactivate
workon ansible-7.6.0

Install roles

ansible-playbook ansible-roles.yaml

Install PostgreSQL

ansible-playbook -i inventory/hosts postgresql.yaml -u almalinux

PostgreSQL options example

postgresql_custom_parameters:
  max_connections: '2000'

Backup options example

postgresql_wal_g_install: true
wal_g_config: >-
  {{
  {
    "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_ID",
    "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY",
    "AWS_ENDPOINT": "https://s3.amazon.com",
    "WALG_S3_PREFIX": "s3://wal-g/pgsql-1",
    "WALG_LIBSODIUM_KEY": "29b43e2f46adcaf9f0d635d9fe4934e3227b3cbd13e2b19c7b28c16a581cc15c"
    "AWS_S3_FORCE_PATH_STYLE": "true"
  }
  }}