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

7 лет назад
8 лет назад
8 лет назад
8 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. - service: apache
  11. {{ apache.configfile }}:
  12. file.managed:
  13. - template: jinja
  14. - source:
  15. - salt://apache/files/{{ salt['grains.get']('os_family') }}/apache-{{ apache.version }}.config.jinja
  16. - require:
  17. - pkg: apache
  18. - watch_in:
  19. - service: apache
  20. - context:
  21. apache: {{ apache }}
  22. {{ apache.vhostdir }}:
  23. file.directory:
  24. - makedirs: True
  25. - require:
  26. - pkg: apache
  27. - watch_in:
  28. - service: apache
  29. {% if grains['os_family']=="Debian" %}
  30. /etc/apache2/envvars:
  31. file.managed:
  32. - template: jinja
  33. - source:
  34. - salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
  35. - require:
  36. - pkg: apache
  37. - watch_in:
  38. - service: apache
  39. {{ apache.portsfile }}:
  40. file.managed:
  41. - template: jinja
  42. - source:
  43. - salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
  44. - require:
  45. - pkg: apache
  46. - watch_in:
  47. - service: apache
  48. - context:
  49. apache: {{ apache }}
  50. {% endif %}
  51. {% if grains['os_family']=="RedHat" %}
  52. /etc/httpd/conf.d/welcome.conf:
  53. file.absent:
  54. - require:
  55. - pkg: apache
  56. - watch_in:
  57. - service: apache
  58. {% endif %}
  59. {% if grains['os_family']=="Suse" or salt['grains.get']('os') == 'SUSE' %}
  60. /etc/apache2/global.conf:
  61. file.managed:
  62. - template: jinja
  63. - source:
  64. - salt://apache/files/{{ salt['grains.get']('os_family') }}/global.config.jinja
  65. - require:
  66. - pkg: apache
  67. - watch_in:
  68. - service: apache
  69. - context:
  70. apache: {{ apache }}
  71. {% endif %}
  72. {% if grains['os_family']=="FreeBSD" %}
  73. /usr/local/etc/{{ apache.service }}/envvars.d/by_salt.env:
  74. file.managed:
  75. - template: jinja
  76. - source:
  77. - salt://apache/files/{{ salt['grains.get']('os_family') }}/envvars-{{ apache.version }}.jinja
  78. - require:
  79. - pkg: apache
  80. - watch_in:
  81. - service: apache
  82. {{ apache.portsfile }}:
  83. file.managed:
  84. - template: jinja
  85. - source:
  86. - salt://apache/files/{{ salt['grains.get']('os_family') }}/ports-{{ apache.version }}.conf.jinja
  87. - require:
  88. - pkg: apache
  89. - watch_in:
  90. - service: apache
  91. - context:
  92. apache: {{ apache }}
  93. {% endif %}