mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
a6d62ef59b
commit
2f39d37a97
1 changed files with 4 additions and 1 deletions
|
@ -56,6 +56,8 @@ class ActionModule(object):
|
||||||
results = dict(failed=True, msg="src and dest are required")
|
results = dict(failed=True, msg="src and dest are required")
|
||||||
return ReturnData(conn=conn, result=results)
|
return ReturnData(conn=conn, result=results)
|
||||||
|
|
||||||
|
source = os.path.expanduser(source)
|
||||||
|
|
||||||
if flat:
|
if flat:
|
||||||
if dest.endswith("/"):
|
if dest.endswith("/"):
|
||||||
# if the path ends with "/", we'll use the source filename as the
|
# if the path ends with "/", we'll use the source filename as the
|
||||||
|
@ -68,7 +70,8 @@ class ActionModule(object):
|
||||||
else:
|
else:
|
||||||
# files are saved in dest dir, with a subdir for each host, then the filename
|
# files are saved in dest dir, with a subdir for each host, then the filename
|
||||||
dest = "%s/%s/%s" % (utils.path_dwim(self.runner.basedir, dest), conn.host, source)
|
dest = "%s/%s/%s" % (utils.path_dwim(self.runner.basedir, dest), conn.host, source)
|
||||||
dest = dest.replace("//","/")
|
|
||||||
|
dest = os.path.expanduser(dest.replace("//","/"))
|
||||||
|
|
||||||
# calculate md5 sum for the remote file
|
# calculate md5 sum for the remote file
|
||||||
remote_md5 = self.runner._remote_md5(conn, tmp, source)
|
remote_md5 = self.runner._remote_md5(conn, tmp, source)
|
||||||
|
|
Loading…
Reference in a new issue