YAML does not handle \ very well as it is an escaping character in most
situations. When defining tasks I would highly recommend using the YAML for
instead of the older key=arg form as it makes your code more readable and
you don't have to escape \. Your task would now look like this
- name: Copies file to Windows
win_copy:
src: /ansible/ansible.cfg
dest: C:\Users\YRunner\Desktop\test1
When using the YAML form, you don't need to escape \ unless you have double
quoted the value. I found you don't need to quote a value unless you want
to convert it to a string or it contains a :.
This has more info on this particular
topic
http://docs.ansible.com/ansible/devel/windows_usage.html#path-formatting-for-windows.
Thanks
Jordan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d197dc22-775c-4c1d-9695-cf02b70129f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.