Created
May 18, 2017 16:17
-
-
Save Inveracity/4fa8a181ebe6b9ce6d9cd7bf19564fe2 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
#grains in yaml format | |
dictkey: | |
- "list element 0" | |
- "list element 1" | |
- "list element 2" | |
#jinja2 | |
{% set myitem = grains['dictkey'][1] %} | |
some state: | |
my.state: | |
- name: {{ myitem }} # This produces "list element 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment