server.sls 658 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # burp backup server
  3. #
  4. include:
  5. - burp
  6. burp-server:
  7. pkg.installed
  8. /etc/default/burp:
  9. file.managed:
  10. - source: salt://burp/default_burp
  11. /etc/burp/burp.conf:
  12. file.managed:
  13. - source: salt://burp/burp-server.conf.tmpl
  14. - template: jinja
  15. /etc/burp/clientconfdir:
  16. file.directory:
  17. - mode: 700
  18. {% set nodes = salt['pillar.get']('nodes') %}
  19. {% for node, node_config in nodes.items()|sort if 'burp' in node_config %}
  20. /etc/burp/clientconfdir/{{ node }}:
  21. file.managed:
  22. - source: salt://burp/client.tmpl
  23. - template: jinja
  24. - context:
  25. node: {{ node }}
  26. burp_config: {{ node_config.get ('burp') }}
  27. {% endfor %}