diff --git a/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml b/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml index f5b927d100..17cb6c4f8d 100644 --- a/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml +++ b/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml @@ -6,7 +6,7 @@ - name: Copy file, dest is a file in non-existing target directory copy: src: foo.txt - dest: '{{ remote_dir }}/new_sub_dir1/sub_dir2/foo.txt' + dest: '{{ dest }}' register: copy_result ignore_errors: True diff --git a/test/integration/targets/copy/tasks/tests.yml b/test/integration/targets/copy/tasks/tests.yml index 74328d6713..0477378bcc 100644 --- a/test/integration/targets/copy/tasks/tests.yml +++ b/test/integration/targets/copy/tasks/tests.yml @@ -938,3 +938,8 @@ # src is a file, dest is file in a non-existent directory: checks that a failure occurs - include: src_file_dest_file_in_non_existent_dir.yml + with_items: + - '{{ remote_dir }}/new_sub_dir1/sub_dir2/foo.txt' + - '{{ remote_dir }}/new_sub_dir1/foo.txt' + loop_control: + loop_var: 'dest'