mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
Add integration test for copy with force=false when dest exists (#81756)
ci_complete ci_coverage
This commit is contained in:
@@ -92,6 +92,18 @@
|
||||
- "stat_results.stat.issock == false"
|
||||
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
|
||||
|
||||
- name: Test copying content with force=false when the dest already exists
|
||||
copy:
|
||||
content: other_data
|
||||
dest: "{{ remote_file }}"
|
||||
mode: 0444
|
||||
force: False
|
||||
register: repeat_copy_result
|
||||
|
||||
- name: Assert no changes are made
|
||||
assert:
|
||||
that: repeat_copy_result is not changed
|
||||
|
||||
- name: Overwrite the file via same means
|
||||
copy:
|
||||
src: foo.txt
|
||||
|
||||
Reference in New Issue
Block a user