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.

102 lines
3.3KB

  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. salt['grains.filter_by']({
  21. 'stretch': 'libjemalloc1',
  22. 'default': 'libjemalloc2'
  23. }, grain='oscodename'),
  24. ],
  25. 'postgresql_package': 'libpq-dev',
  26. 'mysql_package' : 'libmariadbclient-dev',
  27. 'redis_package' : 'redis-server',
  28. 'redis_service' : 'redis-server',
  29. 'configuration' : {
  30. 'environment': {
  31. 'certificate_authorities': '/etc/ssl/certs/ca-certificates.crt'
  32. }
  33. },
  34. 'libjemalloc': salt['grains.filter_by']({
  35. 'stretch': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
  36. 'default': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.2'
  37. }, grain='oscodename'),
  38. },
  39. 'RedHat': {
  40. 'dependencies' : [
  41. 'tar',
  42. 'make',
  43. 'automake',
  44. 'gcc',
  45. 'gcc-c++',
  46. 'git',
  47. 'net-tools',
  48. 'libcurl-devel',
  49. 'libxml2-devel',
  50. 'libffi-devel',
  51. 'libxslt-devel',
  52. 'wget',
  53. 'ImageMagick',
  54. 'nodejs',
  55. ],
  56. 'postgresql_package': 'postgresql-devel',
  57. 'mysql_package' : 'mariadb-devel',
  58. 'redis_package' : 'redis',
  59. 'redis_service' : 'redis',
  60. 'configuration' : {
  61. 'environment': {
  62. 'certificate_authorities': '/etc/pki/tls/certs/ca-bundle.crt'
  63. }
  64. },
  65. 'libjemalloc': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
  66. },
  67. }, merge=salt['grains.filter_by']({
  68. 'Ubuntu': {
  69. 'dependencies' : [
  70. 'build-essential',
  71. 'git',
  72. 'curl',
  73. 'libcurl4-openssl-dev',
  74. 'libssl-dev',
  75. 'libxml2-dev',
  76. 'libxslt1-dev',
  77. 'libgmp-dev',
  78. 'imagemagick',
  79. 'libmagickwand-dev',
  80. 'nodejs',
  81. salt['grains.filter_by']({
  82. 'bionic': 'libjemalloc1',
  83. 'default': 'libjemalloc2'
  84. }, grain='oscodename'),
  85. ],
  86. 'mysql_package' : 'libmysqlclient-dev',
  87. 'libjemalloc': salt['grains.filter_by']({
  88. 'bionic': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1',
  89. 'default': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.2'
  90. }, grain='oscodename'),
  91. },
  92. }, grain='os', merge=salt['pillar.get']('diaspora:lookup'))) %}
  93. {% import_yaml "diaspora/defaults.yaml" as defaults %}
  94. {% do defaults.diaspora.update(os_map) %}
  95. # use production as default rails environment
  96. {% do defaults.diaspora.configuration.update({'server': {'rails_environment': 'production'}}) %}
  97. {% set diaspora = salt['pillar.get']('diaspora', default=defaults.diaspora, merge=True) %}