Ansible roles
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.
 
 
 
 
 
 

16 lines
501 B

# {{ 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 %}