mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-25 22:53:23 +02:00
17 lines
501 B
Django/Jinja
17 lines
501 B
Django/Jinja
# {{ 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 %}
|
|
|