Skip to content

Commit 25e0aaf

Browse files
Nnoelmcloughlin
N
authored andcommitted
limits file has jinja context; fix saltstack-formulas#213
1 parent 6840bf3 commit 25e0aaf

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

pillar.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ postgres:
2929
# macos limits
3030
limits:
3131
soft: 64000
32-
hard: 64000
32+
hard: 128000
3333

3434
# POSTGRES
3535
# Append the lines under this item to your postgresql.conf file.

postgres/dev.sls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ postgres_maxfiles_limits_conf:
4545
file.managed:
4646
- name: /Library/LaunchDaemons/limit.maxfiles.plist
4747
- source: salt://{{ tpldir }}/templates/limit.maxfiles.plist
48+
- template: jinja
4849
- context:
49-
soft_limit: {{ postgres.limits.soft or postgres.limits.hard }}
50-
hard_limit: {{ postgres.limits.hard or postgres.limits.soft }}
50+
soft_limit: {{ postgres.limits.soft | default(postgres.limits.hard, true) }}
51+
hard_limit: {{ postgres.limits.hard | default(postgres.limits.soft, true) }}
5152
- group: {{ postgres.group }}
5253
{% endif %}
5354

postgres/osfamilymap.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ MacOS:
184184
test: test -f /Users/{{ repo.user }}/Library/AppSupport/postgres_{{ repo.use_upstream_repo }}/PG_VERSION
185185
user: {{ repo.user }}
186186
group: {{ repo.group }}
187+
# macos limits
188+
limits:
189+
soft: 64000
190+
hard: 64000
187191
{%- endif %}
188192

189193
# vim: ft=sls

0 commit comments

Comments
 (0)