Problem
The DBSU SSH key exchange task currently derives its delegation targets from the Ansible inventory group named by pg_cluster:
with_nested:
- "{{ [dbsu_ssh_keys.stdout] }}"
- "{{ groups[pg_cluster] }}"
However, pg_cluster is the logical PostgreSQL cluster identity calculated from instance metadata. It is not guaranteed to be an Ansible group name.
This is visible in Citus inventories: logical clusters such as pg-citus1 and pg-citus2 are members of a broader inventory group, so groups[pg_cluster] may be undefined. As a result, the DBSU SSH key exchange cannot reliably enumerate or delegate to all members of the same logical PostgreSQL cluster.
Expected behavior
The task should exchange each DBSU public key among the members of the same logical PostgreSQL cluster, independently of how hosts are arranged into Ansible inventory groups.
Scope
The issue is limited to DBSU SSH key exchange. Ordinary inventories often hide the problem because their logical cluster name happens to match an inventory group name.
Problem
The DBSU SSH key exchange task currently derives its delegation targets from the Ansible inventory group named by
pg_cluster:However,
pg_clusteris the logical PostgreSQL cluster identity calculated from instance metadata. It is not guaranteed to be an Ansible group name.This is visible in Citus inventories: logical clusters such as
pg-citus1andpg-citus2are members of a broader inventory group, sogroups[pg_cluster]may be undefined. As a result, the DBSU SSH key exchange cannot reliably enumerate or delegate to all members of the same logical PostgreSQL cluster.Expected behavior
The task should exchange each DBSU public key among the members of the same logical PostgreSQL cluster, independently of how hosts are arranged into Ansible inventory groups.
Scope
The issue is limited to DBSU SSH key exchange. Ordinary inventories often hide the problem because their logical cluster name happens to match an inventory group name.