Skip to content

Instantly share code, notes, and snippets.

@anorgan
Last active August 29, 2015 14:17
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 anorgan/8090d3bb7bad3895d869 to your computer and use it in GitHub Desktop.
Save anorgan/8090d3bb7bad3895d869 to your computer and use it in GitHub Desktop.
Pillars and Grains to the rescue
# /srv/pillar/top.sls
base:
'os:Debian':
- match: grain
- debian_packages
'os:RedHat':
- match: grain
- redhat_packages
# /srv/pillar/debian_packages.sls
pkgs:
apache: apache2
# /srv/pillar/redhat_packages.sls
pkgs:
apache: httpd
# /srv/salt/apache.sls
apache:
pkg.installed:
- name: {{ pillar['pkgs']['apache'] }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment