Saltstack Official Salt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

41 lines
901B

  1. salt-master:
  2. pkg.installed:
  3. {% if grains['os_family'] in ['RedHat', 'Debian'] %}
  4. - name: salt-minion
  5. {% else %}
  6. - name: salt
  7. {% endif %}
  8. file.managed:
  9. - name: /etc/salt/master
  10. - template: jinja
  11. - source: salt://salt/files/master
  12. service.running:
  13. - enable: True
  14. - require:
  15. - pkg: salt-minion
  16. - watch:
  17. - file: salt-minion
  18. configure-salt-master:
  19. file.managed:
  20. - name: /etc/salt/master
  21. - source: salt://salt/templates/master.template
  22. - template: jinja
  23. - user: root
  24. - groupt: root
  25. - mode: 0700
  26. run-salt-master:
  27. cmd.wait:
  28. - name: start salt-master
  29. - watch:
  30. - file: run-salt-master
  31. - require:
  32. - file: configure-salt-master
  33. file.managed:
  34. - name: /etc/init/salt-master
  35. - source: salt://salt/templates/upstart-master.conf
  36. - template: jinja
  37. - defaults:
  38. run_mode: master