Skip to content

Role Reference

This page describes each role in the pgEdge Ansible Collection and provides links to detailed documentation for each role.

Role Execution Order

Roles must be applied in a specific order to satisfy dependencies. The following list shows the correct execution sequence:

  1. init_server - Prepares all servers in the cluster.
  2. install_repos - Installs the pgEdge and PGDG package repositories.
  3. install_pgedge - Installs pgEdge packages on pgEdge nodes.
  4. setup_postgres - Initializes PostgreSQL on pgEdge nodes.
  5. install_etcd - Installs etcd on pgEdge nodes (HA only).
  6. install_patroni - Installs Patroni on pgEdge nodes (HA only).
  7. install_backrest - Installs PgBackRest on backup-capable nodes.
  8. setup_etcd - Configures and starts etcd (HA only).
  9. setup_patroni - Configures Patroni and starts the HA cluster (HA only).
  10. setup_haproxy - Configures HAProxy on haproxy nodes (HA only).
  11. setup_pgedge - Creates Spock nodes and establishes subscriptions.
  12. setup_backrest - Configures PgBackRest and runs the first backup.

Role Categories

The roles in this collection fall into four categories.

Configuration Foundation

Role Description
role_config Provides shared variables and computed values to all other roles. You do not call this role directly.

Server Preparation

Role Description
init_server Initializes servers with required packages and system configuration.
install_repos Configures the pgEdge and PGDG package repositories.

Software Installation

Role Description
install_pgedge Installs Postgres with pgEdge extensions.
install_etcd Installs etcd for HA cluster coordination.
install_patroni Installs Patroni for HA management.
install_backrest Installs PgBackRest for backup and restore operations.

Service Configuration

Role Description
setup_postgres Initializes and configures Postgres instances.
setup_etcd Configures and starts etcd clusters.
setup_patroni Configures and starts Patroni.
setup_haproxy Installs and configures HAProxy.
setup_pgedge Establishes Spock replication between nodes.
setup_backrest Configures PgBackRest and schedules backups.