SuperTux88's Diaspora Saltstack 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.

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