Skip to content

Instantly share code, notes, and snippets.

@viq
Created October 23, 2013 18:06
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 viq/7123612 to your computer and use it in GitHub Desktop.
Save viq/7123612 to your computer and use it in GitHub Desktop.
append-file:
cmd:
- cwd: /tmp
- names:
{% for user, name in pillar['names'].iteritems() %}
- echo {{ user }} {{ name.['number'] }} >> logfile.txt
{% endfor %}
- run
names:
joe:
number: 1
dir: '/tmp/1'
mike:
number: 2
dir: '/tmp/2'
sally:
number: 3
dir: '/tmp/3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment