Skip to content

Instantly share code, notes, and snippets.

@jalons

jalons/embeded Secret

Last active August 29, 2015 13:59
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 jalons/9580849f8814d8415bed to your computer and use it in GitHub Desktop.
Save jalons/9580849f8814d8415bed to your computer and use it in GitHub Desktop.
# And trying to be clever with iterkeys() over the dict:
{% for app in pillar.get('application') %}
{% for key, value in app.iteritems() %}
{{ key }}:
pkg.installed:
- name: {{ key }}
- version: {{ value }}
{% endfor %}
{% endfor %}
m3.local:
Data failed to compile:
----------
Rendering SLS "Staging:deploy" failed: Unknown yaml render error; line 14
---
[...]
{'MyApp': 'Release.2.1.4.rc1'}:
pkg.installed:
- name: {'MyApp': 'Release.2.1.4.rc1'}
- version: pillar.get( {'MyApp': 'Release.2.1.4.rc1'} ) <======================
m3.local:
----------
application:
----------
- MyApp:
Release.2.1.4.rc1
----------
- MyPackage:
0.9.9
{% for app in pillar.get('application') %}
{{ app }}:
pkg.installed:
- name: {{ app }}
- version: pillar.get( {{ app }} )
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment