Saltstack Official Salt Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. {% if salt_settings.install_packages %}
  3. minion_installed:
  4. module_and_function: pkg.version
  5. args:
  6. - {{ salt_settings.salt_minion }}
  7. {%- if salt_settings.version is defined %}
  8. assertion: assertEqual
  9. expected-return: {{ salt_settings.version }}
  10. {% else %}
  11. assertion: assertNotEmpty
  12. {%- endif %}
  13. {% endif %}
  14. minion_running:
  15. module_and_function: service.status
  16. args:
  17. - {{ salt_settings.minion_service }}
  18. assertion: assertTrue
  19. minion_enabled:
  20. module_and_function: service.enabled
  21. args:
  22. - {{ salt_settings.minion_service }}
  23. assertion: assertTrue
  24. minion_conf_deployed:
  25. module_and_function: file.search
  26. args:
  27. - {{ salt_settings.config_path }}/master.d/f_defaults.conf
  28. - This file managed by Salt, do not edit by hand!!
  29. assertion: assertTrue
  30. {% if salt_settings.minion_remove_config %}
  31. default-minion-conf-removed:
  32. module_and_function: file.file_exists
  33. args:
  34. - {{ salt_settings.config_path }}/minion
  35. assertion: assertFalse
  36. {% endif %}
  37. old-minion-conf-removed:
  38. module_and_function: file.file_exists
  39. args:
  40. - {{ salt_settings.config_path }}/minion
  41. assertion: assertFalse
  42. {% if 'inotify' in salt_settings.get('minion', {}).get('beacons', {}) and salt_settings.get('pyinotify', False) %}
  43. inotify_installed:
  44. module_and_function: pkg.version
  45. args:
  46. - {{ salt_settings.pyinotify }}
  47. assertion: assertNotEmpty
  48. {% endif %}