Saltstack Official Apache Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

44 linhas
1.1KB

  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 %}