Saltstack Official Nginx 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.

45 satır
1.5KB

  1. {% set nginx = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'apache_utils': 'apache2-utils',
  4. 'group_action': 'pkg.installed',
  5. 'group_pkg': 'build-essential',
  6. 'libpcre_dev': 'libpcre3-dev',
  7. 'libssl_dev': 'libssl-dev',
  8. 'pid_path': '/var/run/nginx.pid',
  9. 'package': 'nginx-full',
  10. 'default_user': 'www-data',
  11. 'default_group': 'www-data',
  12. 'disable_before_rename': False,
  13. 'old_init_disable': 'update-rc.d -f nginx remove',
  14. 'use_upstart': True,
  15. 'use_sysvinit': False,
  16. 'home': '/var/www',
  17. 'conf_dir': '/etc/nginx',
  18. 'log_dir': '/var/log/nginx',
  19. 'sbin_dir': '/usr/sbin',
  20. 'install_prefix': '/usr/local/nginx',
  21. 'make_flags': '-j2'
  22. },
  23. 'RedHat': {
  24. 'apache_utils': 'httpd-tools',
  25. 'group_action': 'pkg.group_installed',
  26. 'group_pkg': 'Development Tools',
  27. 'libpcre_dev': 'pcre-devel',
  28. 'libssl_dev': 'openssl-devel',
  29. 'pid_path': '/run/nginx.pid',
  30. 'package': 'nginx',
  31. 'default_user': 'nginx',
  32. 'default_group': 'nginx',
  33. 'disable_before_rename': True,
  34. 'old_init_disable': 'chkconfig --del nginx',
  35. 'use_upstart': True,
  36. 'use_sysvinit': False,
  37. 'home': '/var/www',
  38. 'conf_dir': '/etc/nginx',
  39. 'log_dir': '/var/log/nginx',
  40. 'sbin_dir': '/usr/sbin',
  41. 'install_prefix': '/usr/local/nginx',
  42. 'make_flags': '-j2'
  43. },
  44. }, grain='os_family', merge=salt['pillar.get']('nginx:lookup'), default='Debian') %}