---

# [HA only] Define database role on this host. Possible values: primary, standby or witness (first server of "postgres" group is primary, second "standby" and the third is "witness" automagically)
database_role: ""

# [HA only] Conninfo parameter populated in the repmgr configuration file
repmgr_conninfo: "host={{ ansible_default_ipv4.address }} dbname={{ repmgr_database }} user={{ repmgr_user }} connect_timeout={{ repmgr_timeout }}"

# [HA only] Name of the repmgr database
repmgr_database: "repmgr"

# [HA only] Listening port for rephacheck
repmgr_repha_port: 8543

# [HA only] List of roles for the repmgr user PostgreSQL pg_hba configuration
repmgr_roles: "LOGIN,REPLICATION,SUPERUSER"

# [HA only] Timeout value for the repmgr connections
repmgr_timeout: 5

# [HA only] Username of the repmgr DB user
repmgr_user: "repmgr"

# [HA only] IP address of the cluster primary node
repmgr_primary_node: "{{ hostvars[groups['postgres'][0]]['ansible_default_ipv4']['address'] }}"

# [HA only] Cluster node index (0, 1, ...)
repmgr_node_id: "{{ (groups['postgres'].index(inventory_hostname)) + 1 | int }}"

# [HA only] Cluster node name
repmgr_node_name: "{{ ansible_hostname }}"

# [HA only] PostgreSQL database version
repmgr_database_version: "{{ database_version | default('15') }}"

# [HA only] PostgreSQL database cluster name
repmgr_database_cluster: "{{ database_cluster | default('main') }}"

# [HA only] PostgreSQL database cluster path
repmgr_database_data_dir: "/var/lib/postgresql/{{ repmgr_database_version }}/{{ repmgr_database_cluster }}"

# [HA only] Repmgr cluster configuration file
repmgr_conf_file: "/etc/postgresql/{{ repmgr_database_version }}/{{ repmgr_database_cluster }}/repmgr.conf"

# [HA only] Packages required for the group. python3-* packages are used for rephacheck
repmgr_packages:
  - repmgr
  - python3
  - python3-psycopg2
  - python3-toml

# [HA only] Group firewall rules filename, see roles/shared/files/nftables/
firewall_rules_files:
  - rephacheck

...
