Saltstack Official Apache Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

97 行
2.9KB

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