@@ -36,12 +36,12 @@ listen master
36
36
option httpchk OPTIONS /master
37
37
http-check expect status 200
38
38
default-server inter 3s fastinter 1s fall 3 rise 4 on-marked-down shutdown-sessions
39
- {% if install_pgbouncer == "true" %}
39
+ {% if install_pgbouncer | bool %}
40
40
{% for host in groups ['postgres_cluster' ] %}
41
41
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ pgbouncer_listen_port }} check port 8008
42
42
{% endfor %}
43
43
{% endif %}
44
- {% if ( install_pgbouncer is not defined ) or ( install_pgbouncer != "true" ) or ( install_pgbouncer | length < 1 ) %}
44
+ {% if ( install_pgbouncer is not defined ) or ( not install_pgbouncer | bool ) %}
45
45
{% for host in groups ['postgres_cluster' ] %}
46
46
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ postgresql_port }} check port 8008
47
47
{% endfor %}
@@ -59,12 +59,12 @@ listen replicas
59
59
balance roundrobin
60
60
http-check expect status 200
61
61
default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions
62
- {% if install_pgbouncer == "true" %}
62
+ {% if install_pgbouncer | bool %}
63
63
{% for host in groups ['postgres_cluster' ] %}
64
64
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ pgbouncer_listen_port }} check port 8008
65
65
{% endfor %}
66
66
{% endif %}
67
- {% if ( install_pgbouncer is not defined ) or ( install_pgbouncer != "true" ) or ( install_pgbouncer | length < 1 ) %}
67
+ {% if ( install_pgbouncer is not defined ) or ( not install_pgbouncer | bool ) %}
68
68
{% for host in groups ['postgres_cluster' ] %}
69
69
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ postgresql_port }} check port 8008
70
70
{% endfor %}
@@ -82,12 +82,12 @@ listen replicas_sync
82
82
balance roundrobin
83
83
http-check expect status 200
84
84
default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions
85
- {% if install_pgbouncer == "true" %}
85
+ {% if install_pgbouncer | bool %}
86
86
{% for host in groups ['postgres_cluster' ] %}
87
87
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ pgbouncer_listen_port }} check port 8008
88
88
{% endfor %}
89
89
{% endif %}
90
- {% if ( install_pgbouncer is not defined ) or ( install_pgbouncer != "true" ) or ( install_pgbouncer | length < 1 ) %}
90
+ {% if ( install_pgbouncer is not defined ) or ( not install_pgbouncer | bool ) %}
91
91
{% for host in groups ['postgres_cluster' ] %}
92
92
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ postgresql_port }} check port 8008
93
93
{% endfor %}
@@ -105,12 +105,12 @@ listen replicas_async
105
105
balance roundrobin
106
106
http-check expect status 200
107
107
default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions
108
- {% if install_pgbouncer == "true" %}
108
+ {% if install_pgbouncer | bool %}
109
109
{% for host in groups ['postgres_cluster' ] %}
110
110
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ pgbouncer_listen_port }} check port 8008
111
111
{% endfor %}
112
112
{% endif %}
113
- {% if ( install_pgbouncer is not defined ) or ( install_pgbouncer != "true" ) or ( install_pgbouncer | length < 1 ) %}
113
+ {% if ( install_pgbouncer is not defined ) or ( not install_pgbouncer | bool ) %}
114
114
{% for host in groups ['postgres_cluster' ] %}
115
115
server {{ hostvars[host] ['ansible_hostname'] }} {{ hostvars[host] ['inventory_hostname'] }}:{{ postgresql_port }} check port 8008
116
116
{% endfor %}
0 commit comments