mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
committed by
Toshio Kuratomi
parent
78dfbed2a5
commit
ecfa7f696d
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user