Saltstack Official Linux 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 lines
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 %}