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.

91 lines
2.7KB

  1. {% set apache = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'server': 'apache2',
  4. 'service': 'apache2',
  5. 'configfile': '/etc/apache2/apache2.conf',
  6. 'mod_wsgi': 'libapache2-mod-wsgi',
  7. 'mod_php5': 'libapache2-mod-php5',
  8. 'mod_fcgid': 'libapache2-mod-fcgid',
  9. 'vhostdir': '/etc/apache2/sites-available',
  10. 'confdir': '/etc/apache2/conf.d',
  11. 'confext': '.conf',
  12. 'default_site': 'default',
  13. 'default_site_ssl': 'default-ssl',
  14. 'logdir': '/var/log/apache2',
  15. 'wwwdir': '/srv',
  16. 'use_require': False,
  17. },
  18. 'RedHat': {
  19. 'server': 'httpd',
  20. 'service': 'httpd',
  21. 'configfile': '/etc/httpd/conf/httpd.conf',
  22. 'mod_wsgi': 'mod_wsgi',
  23. 'vhostdir': '/etc/httpd/conf.d',
  24. 'confdir': '/etc/httpd/conf.d',
  25. 'confext': '.conf',
  26. 'default_site': 'default',
  27. 'default_site_ssl': 'default-ssl',
  28. 'logdir': '/var/log/httpd',
  29. 'wwwdir': '/var/www',
  30. 'use_require': False,
  31. },
  32. 'Suse': {
  33. 'server': 'apache2',
  34. 'service': 'apache2',
  35. 'configfile': '/etc/apache2/httpd.conf',
  36. 'mod_wsgi': 'apache2-mod_wsgi',
  37. 'mod_php5': 'apache2-mod_php5',
  38. 'mod_fcgid': 'apache2-mod_fcgid',
  39. 'vhostdir': '/etc/apache2/vhosts.d',
  40. 'confdir': '/etc/httpd/conf.d',
  41. 'confext': '.conf',
  42. 'default_site': 'vhost.template',
  43. 'default_site_ssl': 'vhost-ssl.template',
  44. 'logdir': '/var/log/apache2',
  45. 'wwwdir': '/srv/www',
  46. 'use_require': True,
  47. },
  48. 'FreeBSD': {
  49. 'server': 'apache22',
  50. 'service': 'apache22',
  51. 'configfile': '/usr/local/etc/apache22/httpd.conf',
  52. 'mod_wsgi': 'ap22-mod_wsgi3',
  53. 'vhostdir': '/usr/local/etc/apache22/Includes',
  54. 'confdir': '/usr/local/etc/apache22/Includes',
  55. 'confext': '',
  56. 'default_site': 'default',
  57. 'default_site_ssl': 'default-ssl',
  58. 'logdir': '/var/log/',
  59. 'wwwdir': '/usr/local/www/apache22/',
  60. 'use_require': False,
  61. },
  62. }, merge=salt['grains.filter_by']({
  63. 'trusty': {
  64. 'confext': '.conf',
  65. 'default_site': '000-default.conf',
  66. 'default_site_ssl': 'default-ssl.conf',
  67. 'use_require': True,
  68. },
  69. 'utopic': {
  70. 'confext': '.conf',
  71. 'default_site': '000-default.conf',
  72. 'default_site_ssl': 'default-ssl.conf',
  73. 'use_require': True,
  74. },
  75. 'jessie': {
  76. 'wwwdir': '/var/www',
  77. 'confext': '.conf',
  78. 'default_site': '000-default.conf',
  79. 'default_site_ssl': 'default-ssl.conf',
  80. 'use_require': True,
  81. },
  82. }, grain='oscodename', merge=salt['pillar.get']('apache:lookup'))) %}