Skip to content

Instantly share code, notes, and snippets.

@mshirley
Created November 3, 2015 20:47
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 mshirley/65f2c2e83520c2d17535 to your computer and use it in GitHub Desktop.
Save mshirley/65f2c2e83520c2d17535 to your computer and use it in GitHub Desktop.
# pillar/top.sls
base:
'*':
- pkg_files
# pillar/pkg_files/init.sls
pkg_files:
{% if grains['os_family'] == 'RedHat' %}
kafka: salt://kafka/files/kafka-0.8.2.1-1.x86_64.rpm
#{% elif grains['os_family'] == 'Debian' %}
#kafka: salt://kafka/files/kafka-0.8.2.1-1.x86_64.deb
{% endif %}
# on minion
salt-call pillar.get pkg_files:kafka
local:
salt://kafka/files/kafka-0.8.2.1-1.x86_64.rpm
# on master
salt 'minion.localdomain' pillar.get pkg_files:kafka
minion.localdomain:
# also on master
salt 'minion.localdomain' pillar.items
minion.localdomain:
----------
pkg_files:
----------
kafka:
salt://kafka/files/kafka-0.8.2.1-1.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment