mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Enforce state='file'
in copy
module
This was causing wrong behaviour when `prev_state` was `hard`-link, since the `file` module tried to apply the same `state` on the new file, causing unexpected errors. Particularly, both `overlay` and `devicemapper` storage drivers in docker use hardlinks to share files between layers. This causes most ansible playbooks to fail when working with files from layers below.
This commit is contained in:
parent
78dfbed2a5
commit
ecfa7f696d
3 changed files with 43 additions and 1 deletions
|
@ -331,7 +331,8 @@ class ActionModule(ActionBase):
|
|||
dict(
|
||||
src=source_rel,
|
||||
dest=dest,
|
||||
original_basename=source_rel
|
||||
original_basename=source_rel,
|
||||
state='file',
|
||||
)
|
||||
)
|
||||
if lmode:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue