1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #11732 from amenonsen/9212-rebase

Forbid copy: content="" with a directory destination
This commit is contained in:
James Cammarata 2015-07-25 02:47:19 -04:00
commit eca88d4253

View file

@ -49,6 +49,8 @@ class ActionModule(ActionBase):
return dict(failed=True, msg="src (or content) and dest are required")
elif (source is not None or faf is not None) and content is not None:
return dict(failed=True, msg="src and content are mutually exclusive")
elif content is not None and dest is not None and dest.endswith("/"):
return dict(failed=True, msg="dest must be a file if content is defined")
# Check if the source ends with a "/"
source_trailing_slash = False