|
|
@ -3,21 +3,22 @@
|
|
|
|
- name: integration/action/copy.yml
|
|
|
|
- name: integration/action/copy.yml
|
|
|
|
hosts: test-targets
|
|
|
|
hosts: test-targets
|
|
|
|
tasks:
|
|
|
|
tasks:
|
|
|
|
- copy:
|
|
|
|
- name: Create tiny file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
dest: /tmp/copy-tiny-file
|
|
|
|
dest: /tmp/copy-tiny-file
|
|
|
|
content:
|
|
|
|
content:
|
|
|
|
this is a tiny file.
|
|
|
|
this is a tiny file.
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- copy:
|
|
|
|
- name: Create large file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
dest: /tmp/copy-large-file
|
|
|
|
dest: /tmp/copy-large-file
|
|
|
|
# Must be larger than Connection.SMALL_SIZE_LIMIT.
|
|
|
|
# Must be larger than Connection.SMALL_SIZE_LIMIT.
|
|
|
|
content: "{% for x in range(200000) %}x{% endfor %}"
|
|
|
|
content: "{% for x in range(200000) %}x{% endfor %}"
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
# end of making files
|
|
|
|
- name: Cleanup copied files
|
|
|
|
|
|
|
|
file:
|
|
|
|
- file:
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
path: "{{item}}"
|
|
|
|
path: "{{item}}"
|
|
|
|
with_items:
|
|
|
|
with_items:
|
|
|
@ -26,28 +27,31 @@
|
|
|
|
- /tmp/copy-tiny-inline-file.out
|
|
|
|
- /tmp/copy-tiny-inline-file.out
|
|
|
|
- /tmp/copy-large-inline-file.out
|
|
|
|
- /tmp/copy-large-inline-file.out
|
|
|
|
|
|
|
|
|
|
|
|
# end of cleaning out files
|
|
|
|
- name: Copy large file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
- copy:
|
|
|
|
|
|
|
|
dest: /tmp/copy-large-file.out
|
|
|
|
dest: /tmp/copy-large-file.out
|
|
|
|
src: /tmp/copy-large-file
|
|
|
|
src: /tmp/copy-large-file
|
|
|
|
|
|
|
|
|
|
|
|
- copy:
|
|
|
|
- name: Copy tiny file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
dest: /tmp/copy-tiny-file.out
|
|
|
|
dest: /tmp/copy-tiny-file.out
|
|
|
|
src: /tmp/copy-tiny-file
|
|
|
|
src: /tmp/copy-tiny-file
|
|
|
|
|
|
|
|
|
|
|
|
- copy:
|
|
|
|
- name: Copy tiny inline file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
dest: /tmp/copy-tiny-inline-file.out
|
|
|
|
dest: /tmp/copy-tiny-inline-file.out
|
|
|
|
content: "tiny inline content"
|
|
|
|
content: "tiny inline content"
|
|
|
|
|
|
|
|
|
|
|
|
- copy:
|
|
|
|
- name: Copy large inline file
|
|
|
|
|
|
|
|
copy:
|
|
|
|
dest: /tmp/copy-large-inline-file.out
|
|
|
|
dest: /tmp/copy-large-inline-file.out
|
|
|
|
content: |
|
|
|
|
content: |
|
|
|
|
{% for x in range(200000) %}y{% endfor %}
|
|
|
|
{% for x in range(200000) %}y{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
# stat results
|
|
|
|
# stat results
|
|
|
|
|
|
|
|
|
|
|
|
- stat:
|
|
|
|
- name: Stat copied files
|
|
|
|
|
|
|
|
stat:
|
|
|
|
path: "{{item}}"
|
|
|
|
path: "{{item}}"
|
|
|
|
with_items:
|
|
|
|
with_items:
|
|
|
|
- /tmp/copy-tiny-file.out
|
|
|
|
- /tmp/copy-tiny-file.out
|
|
|
@ -64,7 +68,8 @@
|
|
|
|
- stat.results[3].stat.checksum == "d675f47e467eae19e49032a2cc39118e12a6ee72"
|
|
|
|
- stat.results[3].stat.checksum == "d675f47e467eae19e49032a2cc39118e12a6ee72"
|
|
|
|
fail_msg: stat={{stat}}
|
|
|
|
fail_msg: stat={{stat}}
|
|
|
|
|
|
|
|
|
|
|
|
- file:
|
|
|
|
- name: Cleanup files
|
|
|
|
|
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
path: "{{item}}"
|
|
|
|
path: "{{item}}"
|
|
|
|
with_items:
|
|
|
|
with_items:
|
|
|
|