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.

119 lines
3.7KB

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