Simple fix for spaces in filenames with the template module.
This commit is contained in:
parent
6e2ea327d1
commit
e304cc3d8e
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||||
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))
|
||||||
|
|
Loading…
Reference in a new issue