"failed": true, "invocation": {"module_args": {"dest": "C:\temp\test.conf", "src": "templates/config.j2"}, "module_name": "win_template"}, "msg": "Illegal characters in path."}
---
- include_vars: variables.yml
- name: Config file
win_template: src=templates/config.j2 dest=C:\temp\test.conf
variables.yml:
test_password: test123!
templates/config.j2:
password={{ test_password }}
What exactly is the illegal argument? I'm using Ansible 2.0.0.2 on Ubuntu 14.04.
- name: Config file
win_template: src=templates/config.j2 dest='C:\temp\test.conf'
or if you prefer double quotes:
- name: Config file
win_template: src=templates/config.j2 dest="C:\\temp\\test.conf"
(note the \\ as windows path separator):
actually may need to be
- name: Config file
win_template: "src=templates/config.j2 dest=C:\\temp\\test.conf"
dest="C:\\temp\\test.conf"
Thanks!
-Joe