mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 16:04:09 -07:00
implement lookup plugins for arbitrary enumeration over arbitrary things. See the mailing list for some cool examples.
This commit is contained in:
parent
29d49d415f
commit
c5d2f6b0d3
14 changed files with 135 additions and 28 deletions
|
@ -42,6 +42,11 @@ class ActionModule(object):
|
|||
options = utils.parse_kv(module_args)
|
||||
source = options.get('src', None)
|
||||
dest = options.get('dest', None)
|
||||
|
||||
if dest.endswith("/"):
|
||||
base = os.path.basename(source)
|
||||
dest = os.path.join(dest, base)
|
||||
|
||||
if (source is None and 'first_available_file' not in inject) or dest is None:
|
||||
result = dict(failed=True, msg="src and dest are required")
|
||||
return ReturnData(conn=conn, comm_ok=False, result=result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue