Skip to content

Instantly share code, notes, and snippets.

Created March 15, 2016 18:14
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/dfa357def8ea518688ae to your computer and use it in GitHub Desktop.
Save anonymous/dfa357def8ea518688ae to your computer and use it in GitHub Desktop.
{% for module in salt['pillar.get']('python_modules') %}
install_python_module:
salt.state:
- tgt: {{ grains['id'] }}
- sls: provisioning.upload_python_module_source
- pillar:
module: {{ module }}
{% endfor %}
ABove is called as:
salt-run state.orchestrate provisioning.install_python_module pillar='{python_modules: [foo, bar, baz]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment