Skip to content

Instantly share code, notes, and snippets.

@obitech
Created September 22, 2017 13:30
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 obitech/f80a45b0f315db63f4fa788dfdb870a0 to your computer and use it in GitHub Desktop.
Save obitech/f80a45b0f315db63f4fa788dfdb870a0 to your computer and use it in GitHub Desktop.
Looping over directories in Jinja/Salt
{% set dir_list = salt.file.find('/path/', 'name=foo', 'type=d') %}
{% for direc in dir_list %}
# do stuff
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment