Created
September 22, 2017 13:30
-
-
Save obitech/f80a45b0f315db63f4fa788dfdb870a0 to your computer and use it in GitHub Desktop.
Looping over directories in Jinja/Salt
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
{% 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