Skip to content

Instantly share code, notes, and snippets.

@justlooks
Last active January 4, 2016 13:39
Show Gist options
  • Save justlooks/8629378 to your computer and use it in GitHub Desktop.
Save justlooks/8629378 to your computer and use it in GitHub Desktop.
/usr/local/scribe/conf/scribe.conf:
file.managed:
- source: salt://scribe/mytest_scribe.conf
- template: jinja
- defaults:
projects:
{% for i in pillar[grains['ip_interfaces']['bond0'][0]] %}
- {{i}}
{% endfor %}
in pillar file
192.168.1.1:
- prj1
- prj2
192.168.1.2:
- pj
{% for i in projects %}
i find prj {{i}}
{% endfor %}
in 192.168.1.1
i get
i find prj prj1
i find prj prj2
in 192.168.1.2 # i do not want this because it's only one proj
i find prj p
i find prj j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment