Skip to content

Commit

Permalink
copy: check non-existing one level directory too
Browse files Browse the repository at this point in the history
  • Loading branch information
pilou- authored and abadger committed Aug 13, 2017
1 parent 470989b commit 6f47b3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions test/integration/targets/copy/tasks/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 6f47b3e

Please sign in to comment.