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.

92 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. 'mod_php5': 'php',
  24. 'vhostdir': '/etc/httpd/vhosts.d',
  25. 'confdir': '/etc/httpd/conf.d',
  26. 'confext': '.conf',
  27. 'default_site': 'default',
  28. 'default_site_ssl': 'default-ssl',
  29. 'logdir': '/var/log/httpd',
  30. 'wwwdir': '/var/www',
  31. 'use_require': False,
  32. },
  33. 'Suse': {
  34. 'server': 'apache2',
  35. 'service': 'apache2',
  36. 'configfile': '/etc/apache2/httpd.conf',
  37. 'mod_wsgi': 'apache2-mod_wsgi',
  38. 'mod_php5': 'apache2-mod_php5',
  39. 'mod_fcgid': 'apache2-mod_fcgid',
  40. 'vhostdir': '/etc/apache2/vhosts.d',
  41. 'confdir': '/etc/httpd/conf.d',
  42. 'confext': '.conf',
  43. 'default_site': 'vhost.template',
  44. 'default_site_ssl': 'vhost-ssl.template',
  45. 'logdir': '/var/log/apache2',
  46. 'wwwdir': '/srv/www',
  47. 'use_require': True,
  48. },
  49. 'FreeBSD': {
  50. 'server': 'apache22',
  51. 'service': 'apache22',
  52. 'configfile': '/usr/local/etc/apache22/httpd.conf',
  53. 'mod_wsgi': 'ap22-mod_wsgi3',
  54. 'vhostdir': '/usr/local/etc/apache22/Includes',
  55. 'confdir': '/usr/local/etc/apache22/Includes',
  56. 'confext': '',
  57. 'default_site': 'default',
  58. 'default_site_ssl': 'default-ssl',
  59. 'logdir': '/var/log/',
  60. 'wwwdir': '/usr/local/www/apache22/',
  61. 'use_require': False,
  62. },
  63. }, merge=salt['grains.filter_by']({
  64. 'trusty': {
  65. 'confext': '.conf',
  66. 'default_site': '000-default.conf',
  67. 'default_site_ssl': 'default-ssl.conf',
  68. 'use_require': True,
  69. },
  70. 'utopic': {
  71. 'confext': '.conf',
  72. 'default_site': '000-default.conf',
  73. 'default_site_ssl': 'default-ssl.conf',
  74. 'use_require': True,
  75. },
  76. 'jessie': {
  77. 'wwwdir': '/var/www',
  78. 'confext': '.conf',
  79. 'default_site': '000-default.conf',
  80. 'default_site_ssl': 'default-ssl.conf',
  81. 'use_require': True,
  82. },
  83. }, grain='oscodename', merge=salt['pillar.get']('apache:lookup'))) %}