tmax_opensql.postgres.repmgr_nodes (1.0.3) — lookup

Lookup for repmgr nodes

Authors: Julien Tachoires

Install collection

Install with ansible-galaxy collection install tmax_opensql.postgres:==1.0.3


Add to requirements.yml

  collections:
    - name: tmax_opensql.postgres
      version: 1.0.3

Description

Retrieves the repmgr nodes list, based on node's private IP

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show all members of the repmgr cluster that the current node is part of
  debug: msg="{{ lookup('repmgr_nodes') }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show all members of the repmgr cluster that the {{ primary_private_ip }} is part of
  debug: msg="{{ lookup('repmgr_nodes', primary_private_ip) }}"

Inputs

    
_terms:
    description: The private IP of one member of the repmgr cluster.
    required: false

default:
    description: The private IP of the current node is used.

Outputs

_value:
  description:
  - List of Postgres nodes
  elements: dict
  type: list