Saltstack Official Linux Formula
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.

22 lines
519B

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- for name, limit in system.limit.iteritems() %}
  4. linux_limit_{{ name }}:
  5. {%- if limit.get('enabled', True) %}
  6. file.managed:
  7. - name: /etc/security/limits.d/90-salt-{{ name }}.conf
  8. - source: salt://linux/files/limits.conf
  9. - template: jinja
  10. - defaults:
  11. limit_name: {{ name }}
  12. {%- else %}
  13. file.absent:
  14. - name: /etc/security/limits.d/90-salt-{{ name }}.conf
  15. {%- endif %}
  16. {%- endfor %}
  17. {%- endif %}