init.sls 730 B

12345678910111213141516171819202122232425262728
  1. #
  2. # elasticsearch
  3. #
  4. elasticsearch7x:
  5. pkgrepo.managed:
  6. - humanname: Elasticsearch 7.x
  7. - name: deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main
  8. - file: /etc/apt/sources.list.d/elastic-7.x.list
  9. - key_url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
  10. elasticsearch:
  11. pkg.installed:
  12. - name: elasticsearch-oss
  13. service.running:
  14. - name: elasticsearch
  15. - enable: True
  16. - require:
  17. - file: /etc/elasticsearch/elasticsearch.yml
  18. - watch:
  19. - file: /etc/elasticsearch/elasticsearch.yml
  20. /etc/elasticsearch/elasticsearch.yml:
  21. file.managed:
  22. - source:
  23. - salt://elasticsearch/elasticsearch.yml.H_{{grains['id']}}
  24. - salt://elasticsearch/elasticsearch.yml