Advertisement
Guest User

Untitled

a guest
Aug 25th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. Pillar:
  2.  
  3. apache:
  4. default: bellingham
  5. options:
  6. minspareservers: 20
  7. maxspareservers: 30
  8. maxclients: 60
  9. keepalive: 'Off'
  10.  
  11.  
  12. State:
  13.  
  14. /etc/apache2/apache2.conf:
  15. file:
  16. - managed
  17. - source: salt://apache/apache2.conf
  18. - template: jinja
  19. - defaults:
  20. minspareservers: 5
  21. maxspareservers: 10
  22. maxclients: {{ ((grains.mem_total - 300) / 90) | int }}
  23. keepalivetimeout: 0
  24. keepalive: "Off"
  25. {% if salt['pillar.get']('apache:options', False) %}
  26. - context:
  27. minspareservers: {{ salt['pillar.get']('apache:options:minspareservers', 5) }}
  28. maxspareservers: {{ salt['pillar.get']('apache:options:maxspareservers', 10) }}
  29. maxclients: {{ salt['pillar.get']('apache:options:maxclients', ((grains.mem_total-500)/90) | int ) }}
  30. keepalivetimeout: {{ salt['pillar.get']('apache:options:keepalivetimeout', 0) }}
  31. keepalive: {{ salt['pillar.get']('apache:options:keepalive', "Off") }}
  32. {% endif %}
  33.  
  34.  
  35. apache2.conf:
  36.  
  37. #
  38. # KeepAlive: Whether or not to allow persistent connections (more than
  39. # one request per connection). Set to "Off" to deactivate.
  40. #
  41. KeepAlive {{ keepalive }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement