hypersql_devops.postgres.pg_sr_cluster_nodes (0.3.0) — lookup

Lookup Postgres SR cluster nodes

Authors: Julien Tachoires

Install collection

Install with ansible-galaxy collection install hypersql_devops.postgres:==0.3.0


Add to requirements.yml

  collections:
    - name: hypersql_devops.postgres
      version: 0.3.0

Description

Retrieves the Postgres streaming replication 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 SR cluster that the current node is part of
  debug: msg="{{ lookup('pg_sr_cluster_nodes') }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show all members of the SR cluster that the {{ primary_private_ip }} is part of
  debug: msg="{{ lookup('pg_sr_cluster_nodes', primary_private_ip) }}"

Inputs

    
_terms:
    description: The private IP of one member of the SR 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