Commit 8cc71a6e by James Cammarata

Do not base synchronize source on the inventory directory

parent 35652494
...@@ -33,10 +33,10 @@ class ActionModule(object): ...@@ -33,10 +33,10 @@ class ActionModule(object):
if '_original_file' in self.inject['vars']: if '_original_file' in self.inject['vars']:
# roles # roles
path = utils.path_dwim_relative(self.inject['_original_file'], 'files', path, self.runner.basedir) path = utils.path_dwim_relative(self.inject['_original_file'], 'files', path, self.runner.basedir)
elif 'inventory_dir' in self.inject['vars']: if original_path and original_path[-1] == '/' and path[-1] != '/':
# non-roles # make sure the dwim'd path ends in a trailing "/"
abs_dir = os.path.abspath(self.inject['vars']['inventory_dir']) # if the original path did
path = os.path.join(abs_dir, path) path += '/'
return path return path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment