Skip to content

Instantly share code, notes, and snippets.

Created January 15, 2015 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f59f9b5bbbc01a18a469 to your computer and use it in GitHub Desktop.
Save anonymous/f59f9b5bbbc01a18a469 to your computer and use it in GitHub Desktop.
{% for package in salt['pillar.get']('pkgs::install') %}
{% if package is string %}
{{ package }}-pkg-install:
pkg.installed:
- name: {{ package }}
- skip_verify: True
{% endif %}
{% if package is mapping %}
{{ package.name }}-pkg-install:
pkg.installed:
- name: {{ package.name }}
- version: {{ package.version }}
- allow_updates: {{ package.allow_updates }}
{% endif %}
{% endfor %}
{% if salt['pillar.get']('pkgs:global:remove', []) > 1 %}
{% for package in salt['pillar.get']('pkgs:global:remove') %}
{{ package }}-pkg-remove:
pkg.purged:
- name: {{ package }}
{% endfor %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment