{% set psf_internal = salt["pillar.get"]("psf_internal_network") %}

# PostgreSQL Client Authentication Configuration File
# ===================================================
#

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# Replication
hostssl replication     replicator      {{ psf_internal }}      cert

# bugs.python.org
{% for server, addrs in salt["mine.get"]("roles:tracker", "minealiases.psf_internal", expr_form="grain").items() %}
{% for addr in addrs %}
hostssl bugs-python     bugs-python     {{ addr }} 255.255.255.255 cert
{% endfor %}
{% endfor %}

{% set psf_internal = salt["pillar.get"]("psf_internal_network") %}

# PostgreSQL Client Authentication Configuration File
# ===================================================
#

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# Replication
{% for server, addrs in salt["mine.get"]("roles:postgresql-replica", "minealiases.psf_internal", expr_form="grain").items() %}
{% for addr in addrs %}
hostssl replication     replicator      {{ addr }} 255.255.255.255 cert
{% endfor %}
{% endfor %}

# bugs.python.org
{% for server, addrs in salt["mine.get"]("roles:tracker", "minealiases.psf_internal", expr_form="grain").items() %}
{% for addr in addrs %}
hostssl bugs-python     bugs-python     {{ addr }} 255.255.255.255 cert
{% endfor %}
{% endfor %}

Switch the replicator to single IP addresses
Switch the replicator to single IP addresses
