mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 00:57:00 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
16
roles/postgresql_server/templates/postgresql.conf.j2
Normal file
16
roles/postgresql_server/templates/postgresql.conf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
# {{ 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 %}
|
||||
|
Reference in New Issue
Block a user