Commit e304cc3d by Michael DeHaan

Simple fix for spaces in filenames with the template module.

parent 6e2ea327
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import os import os
import pipes
from ansible import utils from ansible import utils
from ansible import errors from ansible import errors
from ansible.runner.return_data import ReturnData from ansible.runner.return_data import ReturnData
...@@ -105,7 +105,7 @@ class ActionModule(object): ...@@ -105,7 +105,7 @@ class ActionModule(object):
self.runner._low_level_exec_command(conn, "chmod a+r %s" % xfered, tmp) self.runner._low_level_exec_command(conn, "chmod a+r %s" % xfered, tmp)
# run the copy module # run the copy module
module_args = "%s src=%s dest=%s" % (module_args, xfered, dest) module_args = "%s src=%s dest=%s" % (module_args, pipes.quote(xfered), pipes.quote(dest))
if self.runner.check: if self.runner.check:
return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=source, before=dest_contents, after=resultant)) return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=source, before=dest_contents, after=resultant))
......
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