SuperTux88's Diaspora Saltstack Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

87 lines
2.5KB

  1. {% set os_map = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'dependencies' : [
  4. 'build-essential',
  5. 'git',
  6. 'curl',
  7. 'libreadline-dev',
  8. 'libcurl4-openssl-dev',
  9. 'libidn11-dev',
  10. salt['grains.filter_by']({
  11. 'stretch': 'libssl1.0-dev',
  12. 'default': 'libssl-dev'
  13. }, grain='oscodename'),
  14. 'libxml2-dev',
  15. 'libxslt1-dev',
  16. 'imagemagick',
  17. 'libmagickwand-dev',
  18. 'ghostscript',
  19. 'nodejs',
  20. 'libjemalloc1',
  21. ],
  22. 'postgresql_package': 'libpq-dev',
  23. 'mysql_package' : 'libmariadbclient-dev',
  24. 'redis_package' : 'redis-server',
  25. 'redis_service' : 'redis-server',
  26. 'configuration' : {
  27. 'environment': {
  28. 'certificate_authorities': '/etc/ssl/certs/ca-certificates.crt'
  29. }
  30. },
  31. },
  32. 'RedHat': {
  33. 'dependencies' : [
  34. 'tar',
  35. 'make',
  36. 'automake',
  37. 'gcc',
  38. 'gcc-c++',
  39. 'git',
  40. 'net-tools',
  41. 'libcurl-devel',
  42. 'libxml2-devel',
  43. 'libffi-devel',
  44. 'libxslt-devel',
  45. 'wget',
  46. 'ImageMagick',
  47. 'nodejs',
  48. ],
  49. 'postgresql_package': 'postgresql-devel',
  50. 'mysql_package' : 'mariadb-devel',
  51. 'redis_package' : 'redis',
  52. 'redis_service' : 'redis',
  53. 'configuration' : {
  54. 'environment': {
  55. 'certificate_authorities': '/etc/pki/tls/certs/ca-bundle.crt'
  56. }
  57. },
  58. },
  59. }, merge=salt['grains.filter_by']({
  60. 'Ubuntu': {
  61. 'dependencies' : [
  62. 'build-essential',
  63. 'git',
  64. 'curl',
  65. 'libcurl4-openssl-dev',
  66. 'libssl-dev',
  67. 'libxml2-dev',
  68. 'libxslt1-dev',
  69. 'libgmp-dev',
  70. 'imagemagick',
  71. 'libmagickwand-dev',
  72. 'nodejs',
  73. 'libjemalloc1',
  74. ],
  75. 'mysql_package' : 'libmysqlclient-dev',
  76. },
  77. }, grain='os', merge=salt['pillar.get']('diaspora:lookup'))) %}
  78. {% import_yaml "diaspora/defaults.yaml" as defaults %}
  79. {% do defaults.diaspora.update(os_map) %}
  80. # use production as default rails environment
  81. {% do defaults.diaspora.configuration.update({'server': {'rails_environment': 'production'}}) %}
  82. {% set diaspora = salt['pillar.get']('diaspora', default=defaults.diaspora, merge=True) %}