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.

112 satır
3.5KB

  1. {% import_yaml "apache/osfingermap.yaml" as osfingermap %}
  2. {% set apache = salt['grains.filter_by']({
  3. 'Debian': {
  4. 'server': 'apache2',
  5. 'service': 'apache2',
  6. 'configfile': '/etc/apache2/apache2.conf',
  7. 'mod_wsgi': 'libapache2-mod-wsgi',
  8. 'mod_php5': 'libapache2-mod-php5',
  9. 'mod_fcgid': 'libapache2-mod-fcgid',
  10. 'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb',
  11. 'vhostdir': '/etc/apache2/sites-available',
  12. 'confdir': '/etc/apache2/conf.d',
  13. 'confext': '.conf',
  14. 'default_site': 'default',
  15. 'default_site_ssl': 'default-ssl',
  16. 'logdir': '/var/log/apache2',
  17. 'logrotatedir': '/etc/logrotate.d/apache2',
  18. 'wwwdir': '/srv',
  19. 'use_require': False,
  20. },
  21. 'RedHat': {
  22. 'server': 'httpd',
  23. 'service': 'httpd',
  24. 'configfile': '/etc/httpd/conf/httpd.conf',
  25. 'mod_wsgi': 'mod_wsgi',
  26. 'mod_php5': 'php',
  27. 'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm',
  28. 'vhostdir': '/etc/httpd/vhosts.d',
  29. 'confdir': '/etc/httpd/conf.d',
  30. 'confext': '.conf',
  31. 'default_site': 'default',
  32. 'default_site_ssl': 'default-ssl',
  33. 'logdir': '/var/log/httpd',
  34. 'logrotatedir': '/etc/logrotate.d/httpd',
  35. 'wwwdir': '/var/www',
  36. 'use_require': False,
  37. },
  38. 'Suse': {
  39. 'server': 'apache2',
  40. 'service': 'apache2',
  41. 'configfile': '/etc/apache2/httpd.conf',
  42. 'mod_wsgi': 'apache2-mod_wsgi',
  43. 'mod_php5': 'apache2-mod_php5',
  44. 'mod_fcgid': 'apache2-mod_fcgid',
  45. 'vhostdir': '/etc/apache2/vhosts.d',
  46. 'confdir': '/etc/httpd/conf.d',
  47. 'confext': '.conf',
  48. 'default_site': 'vhost.template',
  49. 'default_site_ssl': 'vhost-ssl.template',
  50. 'logdir': '/var/log/apache2',
  51. 'wwwdir': '/srv/www',
  52. 'use_require': True,
  53. },
  54. 'FreeBSD': {
  55. 'server': 'apache22',
  56. 'service': 'apache22',
  57. 'configfile': '/usr/local/etc/apache22/httpd.conf',
  58. 'mod_wsgi': 'ap22-mod_wsgi3',
  59. 'vhostdir': '/usr/local/etc/apache22/Includes',
  60. 'confdir': '/usr/local/etc/apache22/Includes',
  61. 'confext': '',
  62. 'default_site': 'default',
  63. 'default_site_ssl': 'default-ssl',
  64. 'logdir': '/var/log/',
  65. 'wwwdir': '/usr/local/www/apache22/',
  66. 'use_require': False,
  67. },
  68. }, merge=salt['grains.filter_by']({
  69. 'trusty': {
  70. 'confext': '.conf',
  71. 'default_site': '000-default.conf',
  72. 'default_site_ssl': 'default-ssl.conf',
  73. 'use_require': True,
  74. },
  75. 'utopic': {
  76. 'confext': '.conf',
  77. 'default_site': '000-default.conf',
  78. 'default_site_ssl': 'default-ssl.conf',
  79. 'use_require': True,
  80. },
  81. 'vivid': {
  82. 'confext': '.conf',
  83. 'default_site': '000-default.conf',
  84. 'default_site_ssl': 'default-ssl.conf',
  85. 'use_require': True,
  86. },
  87. 'wily': {
  88. 'confext': '.conf',
  89. 'default_site': '000-default.conf',
  90. 'default_site_ssl': 'default-ssl.conf',
  91. 'use_require': True,
  92. },
  93. 'jessie': {
  94. 'wwwdir': '/var/www',
  95. 'confext': '.conf',
  96. 'default_site': '000-default.conf',
  97. 'default_site_ssl': 'default-ssl.conf',
  98. 'use_require': True,
  99. },
  100. }, grain='oscodename', merge=salt['grains.filter_by'](
  101. osfingermap
  102. , grain='osfinger', merge=salt['pillar.get']('apache:lookup')))) %}