You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
501 B
17 lines
501 B
5 years ago
|
# {{ ansible_managed }}
|
||
|
|
||
|
port = {{ pg_port }}
|
||
|
|
||
|
{% for key in pg_conf.keys() | list | sort %}
|
||
|
{% if key == 'listen_addresses' %}
|
||
|
listen_addresses = '{{ pg_conf[key] | join("','") }}'
|
||
|
{% elif key in pg_pct_mem_directives and pg_conf[key] is search('%$') %}
|
||
|
{{ key }} = {{ ((pg_conf[key] | regex_replace('%$', '') | int) * ansible_memtotal_mb * 0.01) | int }}MB
|
||
|
{% elif pg_conf[key] is search(',|/') %}
|
||
|
{{ key }} = '{{ pg_conf[key] }}'
|
||
|
{% else %}
|
||
|
{{ key }} = {{ pg_conf[key] }}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
|