|
|
@ -369,6 +369,10 @@ class Runner(object):
|
|
|
|
if source is None or dest is None:
|
|
|
|
if source is None or dest is None:
|
|
|
|
return (host, True, dict(failed=True, msg="src and dest are required"), '')
|
|
|
|
return (host, True, dict(failed=True, msg="src and dest are required"), '')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# apply templating to source argument
|
|
|
|
|
|
|
|
inject = self.setup_cache.get(conn.host,{})
|
|
|
|
|
|
|
|
source = utils.template(source, inject)
|
|
|
|
|
|
|
|
|
|
|
|
# transfer the file to a remote tmp location
|
|
|
|
# transfer the file to a remote tmp location
|
|
|
|
tmp_src = tmp + source.split('/')[-1]
|
|
|
|
tmp_src = tmp + source.split('/')[-1]
|
|
|
|
conn.put_file(utils.path_dwim(self.basedir, source), tmp_src)
|
|
|
|
conn.put_file(utils.path_dwim(self.basedir, source), tmp_src)
|
|
|
@ -459,6 +463,10 @@ class Runner(object):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
metadata = '~/.ansible/setup'
|
|
|
|
metadata = '~/.ansible/setup'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# apply templating to source argument
|
|
|
|
|
|
|
|
inject = self.setup_cache.get(conn.host,{})
|
|
|
|
|
|
|
|
source = utils.template(source, inject)
|
|
|
|
|
|
|
|
|
|
|
|
# first copy the source template over
|
|
|
|
# first copy the source template over
|
|
|
|
temppath = tmp + os.path.split(source)[-1]
|
|
|
|
temppath = tmp + os.path.split(source)[-1]
|
|
|
|
conn.put_file(utils.path_dwim(self.basedir, source), temppath)
|
|
|
|
conn.put_file(utils.path_dwim(self.basedir, source), temppath)
|
|
|
|