Saltstack Official Linux Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

34 行
806B

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. linux_packages:
  4. pkg.installed:
  5. - names: {{ system.pkgs }}
  6. {%- for name, package in system.package.iteritems() %}
  7. linux_extra_package_{{ name }}:
  8. {%- if package.version == 'latest' %}
  9. pkg.latest:
  10. {%- elif package.version == 'purged' %}
  11. pkg.purged:
  12. {%- elif package.version == 'removed' %}
  13. pkg.removed:
  14. {%- else %}
  15. pkg.installed:
  16. - version: {{ package.version }}
  17. {%- endif %}
  18. - name: {{ name }}
  19. {%- if package.repo is defined %}
  20. - fromrepo: {{ package.repo }}
  21. {%- endif %}
  22. {%- if package.hold is defined %}
  23. - hold: {{ package.hold }}
  24. {%- endif %}
  25. {%- if package.verify is defined %}
  26. - skip_verify: {{ true if package.verify else false }}
  27. {%- endif %}
  28. {%- endfor %}
  29. {%- endif %}