New version of salt-formula from Saltstack
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

service.sls 978B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {%- from "salt/map.jinja" import minion with context %}
  2. {%- if minion.enabled %}
  3. {%- if minion.source.get('engine', 'pkg') == 'pkg' %}
  4. salt_minion_packages:
  5. pkg.latest:
  6. - names: {{ minion.pkgs }}
  7. {%- if minion.source.version is defined %}
  8. - version: {{ minion.source.version }}
  9. {%- endif %}
  10. {%- elif minion.source.get('engine', 'pkg') == 'pip' %}
  11. salt_minion_packages:
  12. pip.installed:
  13. - name: salt{% if minion.source.version is defined %}=={{ minion.source.version }}{% endif %}
  14. {%- endif %}
  15. /etc/salt/minion.d/minion.conf:
  16. file.managed:
  17. - source: salt://salt/files/minion.conf
  18. - user: root
  19. - group: root
  20. - template: jinja
  21. - require:
  22. - {{ minion.install_state }}
  23. {%- if not grains.get('noservices', False) %}
  24. - watch_in:
  25. - service: salt_minion_service
  26. {%- endif %}
  27. {%- if not grains.get('noservices', False) %}
  28. salt_minion_service:
  29. service.running:
  30. - name: {{ minion.service }}
  31. - enable: true
  32. {%- endif %}
  33. {%- endif %}