Skip to content

Commit

Permalink
Merge pull request ansible#8271 from tksmd/fix-copy-set-fs-attributes…
Browse files Browse the repository at this point in the history
…-issue

fix an issue that copying directory will fail when trying to change file attributes
  • Loading branch information
jimi-c committed Jul 25, 2014
2 parents 63bcbd0 + 1b1d5d0 commit 57f89b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ansible/runner/action_plugins/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def run(self, conn, tmp_path, module_name, module_args, inject, complex_args=Non
new_module_args = dict(
src=tmp_src,
dest=dest,
original_basename=source_rel
)
if self.runner.noop_on_check(inject):
new_module_args['CHECKMODE'] = True
Expand Down
8 changes: 7 additions & 1 deletion test/integration/roles/test_copy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,11 @@
# ignore_errors: True
# register: failed_copy

- name: copy already copied directory again
copy: src=subdir dest={{output_subdir | expanduser}} owner={{ansible_ssh_user}}
register: copy_result5


- name: assert that the directory was not changed
assert:
that:
- "not copy_result5|changed"

0 comments on commit 57f89b8

Please sign in to comment.