Saltstack Official Salt 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.

34 satır
974B

  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. salt-master:
  3. {% if salt_settings.install_packages %}
  4. pkg.installed:
  5. - name: {{ salt_settings.salt_master }}
  6. {% endif %}
  7. file.recurse:
  8. - name: {{ salt_settings.config_path }}/master.d
  9. - template: jinja
  10. - source: salt://{{ slspath }}/files/master.d
  11. - clean: {{ salt_settings.clean_config_d_dir }}
  12. - exclude_pat: _*
  13. service.running:
  14. - enable: True
  15. - name: {{ salt_settings.master_service }}
  16. - watch:
  17. {% if salt_settings.install_packages %}
  18. - pkg: salt-master
  19. {% endif %}
  20. - file: salt-master
  21. - file: remove-old-master-conf-file
  22. {% if salt_settings.master_remove_config %}
  23. remove-default-master-conf-file:
  24. file.absent:
  25. - name: {{ salt_settings.config_path }}/master
  26. {% endif %}
  27. # clean up old _defaults.conf file if they have it around
  28. remove-old-master-conf-file:
  29. file.absent:
  30. - name: {{ salt_settings.config_path }}/master.d/_defaults.conf