Saltstack Official Apache 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.

преди 11 години
преди 10 години
преди 11 години
преди 10 години
преди 11 години
преди 11 години
преди 10 години
преди 10 години
преди 10 години
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% from "apache/map.jinja" import apache with context %}
  2. apache:
  3. pkg.installed:
  4. - name: {{ apache.server }}
  5. group.present:
  6. - name: {{ apache.group }}
  7. - system: True
  8. user.present:
  9. - name: {{ apache.user }}
  10. - gid: {{ apache.group }}
  11. - system: True
  12. {# By default run apache service states (unless pillar is false) #}
  13. {% if salt['pillar.get']('apache:manage_service_states', True) %}
  14. service.running:
  15. - name: {{ apache.service }}
  16. - enable: True
  17. # The following states are inert by default and can be used by other states to
  18. # trigger a restart or reload as needed.
  19. apache-reload:
  20. module.wait:
  21. - name: service.reload
  22. - m_name: {{ apache.service }}
  23. apache-restart:
  24. module.wait:
  25. - name: service.restart
  26. - m_name: {{ apache.service }}
  27. {% else %}
  28. apache-reload:
  29. test.show_notification:
  30. - name: Skipping reload per user request
  31. - text: Pillar manage_service_states is False
  32. apache-restart:
  33. test.show_notification:
  34. - name: Skipping restart per user request
  35. - text: Pillar manage_service_states is False
  36. {% endif %}