Last active
January 4, 2016 13:39
-
-
Save justlooks/8629378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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