|
|
@ -37,7 +37,6 @@
|
|
|
|
- "'state' in copy_result"
|
|
|
|
- "'state' in copy_result"
|
|
|
|
- "'uid' in copy_result"
|
|
|
|
- "'uid' in copy_result"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify that the file was marked as changed
|
|
|
|
- name: verify that the file was marked as changed
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
@ -110,32 +109,21 @@
|
|
|
|
register: stat_bar
|
|
|
|
register: stat_bar
|
|
|
|
|
|
|
|
|
|
|
|
- name: check that a file in a deeper directory was transferred
|
|
|
|
- name: check that a file in a deeper directory was transferred
|
|
|
|
stat: path={{output_dir}}/sub/subdir/subdir2/bar2.txt
|
|
|
|
stat: path={{output_dir}}/sub/subdir/subdir2/baz.txt
|
|
|
|
register: stat_bar2
|
|
|
|
register: stat_bar2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- debug: var=stat_bar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- fail: msg="boom!"
|
|
|
|
|
|
|
|
when: not stat_bar.stat.exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: { that: "stat_bar.stat.exists" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: assert recursive copy things
|
|
|
|
- name: assert recursive copy things
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "stat_bar.stat.exists"
|
|
|
|
- "stat_bar.stat.exists"
|
|
|
|
- "stat_bar2.stat.exists"
|
|
|
|
- "stat_bar2.stat.exists"
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: test that copy fails if the path does not exist
|
|
|
|
# errors on this aren't presently ignored so this test is commented out. But it would be nice to fix.
|
|
|
|
|
|
|
|
#
|
|
|
|
- name: assert invalid copy location fails
|
|
|
|
#- name: assert invalid copy input location fails
|
|
|
|
copy: src=invalid_file_location_does_not_exist dest={{output_dir}}/file.txt
|
|
|
|
# copy: src=invalid_file_location_does_not_exist dest={{output_dir}}/file.txt
|
|
|
|
ignore_errors: True
|
|
|
|
# ignore_errors: True
|
|
|
|
register: failed_copy
|
|
|
|
# register: failed_copy
|
|
|
|
|
|
|
|
|
|
|
|
- debug: var=failed_copy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|