init.sls 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # graylog
  3. #
  4. {% set graylog_config = salt['pillar.get']('logging:graylog') %}
  5. include:
  6. - mongodb
  7. - elasticsearch
  8. graylog-repo:
  9. # add Graylog Repo
  10. pkgrepo.managed:
  11. - humanname: Graylog Repo
  12. - name: deb https://packages.graylog2.org/repo/debian/ stable 4.1
  13. - file: /etc/apt/sources.list.d/graylog.list
  14. - key_url: https://packages.graylog2.org/repo/debian/keyring.gpg
  15. # install graylog
  16. graylog-server:
  17. pkg.installed:
  18. - pkgs:
  19. - graylog-server
  20. - graylog-enterprise-plugins
  21. - require:
  22. - pkgrepo: graylog-repo
  23. - service: mongodb
  24. - service: elasticsearch
  25. service.running:
  26. - enable: True
  27. - require:
  28. - pkg: graylog-server
  29. - file: /etc/graylog/server/server.conf
  30. - watch:
  31. - file: /etc/graylog/server/server.conf
  32. /etc/graylog/server/server.conf:
  33. file.managed:
  34. - source: salt://graylog/server.conf.tmpl
  35. - template: jinja
  36. - context:
  37. graylog_config: {{graylog_config}}
  38. - require:
  39. - pkg: graylog-server