Skip to content

Instantly share code, notes, and snippets.

@sivel
Created February 23, 2016 21:50
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 sivel/a641a7d121c3cc7c8fbf to your computer and use it in GitHub Desktop.
Save sivel/a641a7d121c3cc7c8fbf to your computer and use it in GitHub Desktop.
copy recursive force=false
diff --git a/test/integration/roles/test_copy/tasks/main.yml b/test/integration/roles/test_copy/tasks/main.yml
index edae89f..f15559d 100644
--- a/test/integration/roles/test_copy/tasks/main.yml
+++ b/test/integration/roles/test_copy/tasks/main.yml
@@ -174,6 +174,24 @@
that:
- "not copy_result5|changed"
+- name: test recursive copy to directory sub2
+ copy: src=subdir dest={{output_dir}}/sub2 directory_mode=0700 force=false
+ register: recursive_copy_result2
+
+- name: assert that sub2 recursive copy changed
+ assert:
+ that:
+ - recursive_copy_result2|changed
+
+- name: test recursive copy to directory sub2 again
+ copy: src=subdir dest={{output_dir}}/sub2 directory_mode=0700 force=false
+ register: recursive_copy_result3
+
+- name: assert that sub2 2nd recursive copy not changed
+ assert:
+ that:
+ - not recursive_copy_result3|changed
+
# issue 8394
- name: create a file with content and a literal multiline block
copy: |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment