---

repmgr_packages:
  - repmgr
  # rephacheck:
  - python3
  - python3-psycopg2
  - python3-toml

repmgr_pg_version: "{{ pg_version | default('11') }}"
repmgr_pg_cluster: "{{ pg_cluster | default('main') }}"
repmgr_pg_data: /var/lib/postgresql/{{ repmgr_pg_version }}/{{ repmgr_pg_cluster }}

repmgr_config: /etc/postgresql/{{ repmgr_pg_version }}/{{ repmgr_pg_cluster }}/repmgr.conf

repmgr_user: repmgr
repmgr_password:
repmgr_db: repmgr
repmgr_roles: LOGIN,REPLICATION,SUPERUSER

repmgr_primary_node:

repmgr_timeout: 5

repmgr_node_id:
repmgr_node_name: "{{ ansible_hostname }}"
repmgr_conninfo: host={{ ansible_default_ipv4.address }} dbname={{ repmgr_db }} user={{ repmgr_user }} connect_timeout={{ repmgr_timeout }}

repmgr_repha_port: 8543

pg_firewall_enabled: true
pg_ferm_rules_filename: postgres_ha
pg_ferm_input_rules:
  - proto:
      - tcp
    dport:
      - 5432
      - 8543
pg_ferm_output_rules:
  - proto:
      - tcp
    dport:
      - 54321
      - 54322
pg_ferm_global_settings:

...
