From 6f47b3e9e8dd3c65c3b717cb6262ad88237224d5 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Sun, 13 Aug 2017 14:35:09 +0200 Subject: [PATCH] copy: check non-existing one level directory too --- .../copy/tasks/src_file_dest_file_in_non_existent_dir.yml | 2 +- test/integration/targets/copy/tasks/tests.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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 f5b927d100b..17cb6c4f8de 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 74328d6713a..0477378bcc6 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'