Saltstack Official Apache Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

7 лет назад
8 лет назад
8 лет назад
8 лет назад
8 лет назад
8 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {% from "apache/map.jinja" import apache with context %}
  2. include:
  3. - apache
  4. {{ apache.logdir }}:
  5. file.directory:
  6. - makedirs: True
  7. - require:
  8. - pkg: apache
  9. - watch_in:
  10. - module: apache-restart
  11. - require_in:
  12. - module: apache-restart
  13. - module: apache-reload
  14. - service: apache
  15. {{ apache.configfile }}:
  16. file.managed:
  17. - template: jinja
  18. - source:
  19. - salt://apache/files/{{ salt['grains.get']('os_family') }}/apache-{{ apache.version }}.config.jinja
  20. - require:
  21. - pkg: apache
  22. - watch_in:
  23. - module: apache-restart
  24. - require_in:
  25. - module: apache-restart
  26. - module: apache-reload
  27. - service: apache
  28. - context:
  29. apache: {{ apache }}
  30. {{ apache.vhostdir }}:
  31. file.directory:
  32. - makedirs: True
  33. - require:
  34. - pkg: apache
  35. - watch_in:
  36. - module: apache-restart
  37. - require_in:
  38. - module: apache-restart
  39. - module: apache-reload
  40. - service: apache
  41. {% if grains['os_family']=="Debian" %}
  42. /etc/apache2/envvars:
  43. file.managed:
  44. - template: jinja
  45. - source:
  46. - salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
  47. - require:
  48. - pkg: apache
  49. - watch_in:
  50. - module: apache-restart
  51. - require_in:
  52. - module: apache-restart
  53. - module: apache-reload
  54. - service: apache
  55. {{ apache.portsfile }}:
  56. file.managed:
  57. - template: jinja
  58. - source:
  59. - salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
  60. - require:
  61. - pkg: apache
  62. - watch_in:
  63. - module: apache-restart
  64. - require_in:
  65. - module: apache-restart
  66. - module: apache-reload
  67. - service: apache
  68. - context:
  69. apache: {{ apache }}
  70. {% endif %}
  71. {% if grains['os_family']=="RedHat" %}
  72. {{ apache.confdir }}/welcome.conf:
  73. file.absent:
  74. - require:
  75. - pkg: apache
  76. - watch_in:
  77. - module: apache-restart
  78. - require_in:
  79. - module: apache-restart
  80. - module: apache-reload
  81. - service: apache
  82. {% endif %}
  83. {% if grains['os_family']=="Suse" or salt['grains.get']('os') == 'SUSE' %}
  84. /etc/apache2/global.conf:
  85. file.managed:
  86. - template: jinja
  87. - source:
  88. - salt://apache/files/{{ salt['grains.get']('os_family') }}/global.config.jinja
  89. - require:
  90. - pkg: apache
  91. - watch_in:
  92. - module: apache-restart
  93. - require_in:
  94. - module: apache-restart
  95. - module: apache-reload
  96. - service: apache
  97. - context:
  98. apache: {{ apache }}
  99. {% endif %}
  100. {% if grains['os_family']=="FreeBSD" %}
  101. /usr/local/etc/{{ apache.service }}/envvars.d/by_salt.env:
  102. file.managed:
  103. - template: jinja
  104. - source:
  105. - salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
  106. - require:
  107. - pkg: apache
  108. - watch_in:
  109. - module: apache-restart
  110. - require_in:
  111. - module: apache-restart
  112. - module: apache-reload
  113. - service: apache
  114. {{ apache.portsfile }}:
  115. file.managed:
  116. - template: jinja
  117. - source:
  118. - salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
  119. - require:
  120. - pkg: apache
  121. - watch_in:
  122. - module: apache-restart
  123. - require_in:
  124. - module: apache-restart
  125. - module: apache-reload
  126. - service: apache
  127. - context:
  128. apache: {{ apache }}
  129. {% endif %}