Skip to content

Instantly share code, notes, and snippets.

@vr-jack
Last active August 29, 2015 14:27
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 vr-jack/1d984cf972d0701e06fb to your computer and use it in GitHub Desktop.
Save vr-jack/1d984cf972d0701e06fb to your computer and use it in GitHub Desktop.
Recursive Test
local:
----------
ID: base_content
Function: file.recurse
Name: /test/recurse/
Result: True
Comment: The directory /test/recurse/ is in the correct state
Started: 22:50:18.746049
Duration: 18.362 ms
Changes:
----------
ID: sub_content
Function: file.recurse
Name: /test/recurse/player/
Result: True
Comment: The directory /test/recurse/player/ is in the correct state
Started: 22:50:18.764675
Duration: 10.299 ms
Changes:
Summary
------------
Succeeded: 2
Failed: 0
------------
Total states run: 2
ls -aR /test
/test:
. .. recurse
/test/recurse:
. .. .git player testing
/test/recurse/.git:
. .. jim
/test/recurse/player:
. .. testing2
Works as is in 2015.5.3. In 2014.1 we had to remove the trailing '/' on - name: for it to work.
base_content:
file.recurse:
- name: /test/recurse/
- source: salt://test/recurse
- clean: True
- user: root
- group: root
- exclude_pat: E@^(\.git($|/.*)|player($|/.*))
sub_content:
file.recurse:
- name: /test/recurse/player/
- source: salt://test/recurse2
- clean: True
- user: root
- group: root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment