limits file has jinja context; fix #213

This commit is contained in:
N 2018-06-11 20:15:06 +01:00 committed by N
parent 6840bf3839
commit bdbc784f0f
3 changed files with 8 additions and 3 deletions

View file

@ -29,7 +29,7 @@ postgres:
# macos limits # macos limits
limits: limits:
soft: 64000 soft: 64000
hard: 64000 hard: 128000
# POSTGRES # POSTGRES
# Append the lines under this item to your postgresql.conf file. # Append the lines under this item to your postgresql.conf file.

View file

@ -45,9 +45,10 @@ postgres_maxfiles_limits_conf:
file.managed: file.managed:
- name: /Library/LaunchDaemons/limit.maxfiles.plist - name: /Library/LaunchDaemons/limit.maxfiles.plist
- source: salt://{{ tpldir }}/templates/limit.maxfiles.plist - source: salt://{{ tpldir }}/templates/limit.maxfiles.plist
- template: jinja
- context: - context:
soft_limit: {{ postgres.limits.soft or postgres.limits.hard }} soft_limit: {{ postgres.limits.soft }}
hard_limit: {{ postgres.limits.hard or postgres.limits.soft }} hard_limit: {{ postgres.limits.hard }}
- group: {{ postgres.group }} - group: {{ postgres.group }}
{% endif %} {% endif %}

View file

@ -184,6 +184,10 @@ MacOS:
test: test -f /Users/{{ repo.user }}/Library/AppSupport/postgres_{{ repo.use_upstream_repo }}/PG_VERSION test: test -f /Users/{{ repo.user }}/Library/AppSupport/postgres_{{ repo.use_upstream_repo }}/PG_VERSION
user: {{ repo.user }} user: {{ repo.user }}
group: {{ repo.group }} group: {{ repo.group }}
# macos limits
limits:
soft: 64000
hard: 64000
{%- endif %} {%- endif %}
# vim: ft=sls # vim: ft=sls