Skip to content

Commit

Permalink
mine.get can't use compound matching
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Jan 4, 2015
1 parent f0b21de commit e4e1604
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions salt/postgresql/server/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,14 @@ postgresql-psf-cluster:

{% if salt["match.compound"](pillar["roles"]["postgresql-primary"]) %}

{% for replica in salt["mine.get"](pillar["roles"]["postgresql-replica"], "psf_internal").keys() %}
replication-slot-{{ replica.split(".")|first }}:
{% for hostname in salt["mine.get"](pillar["roles"]["postgresql"], "psf_internal").keys() %}
{% if hostname != grains["fqdn"] %}
replication-slot-{{ hostname.split(".")|first }}:
postgres_replica.slot:
- name: {{ replica.split(".")|first }}
- name: {{ hostname.split(".")|first }}
- require:
- service: postgresql-server
{% endif %}
{% endfor %}

replicator:
Expand Down

0 comments on commit e4e1604

Please sign in to comment.