I'm having a problem creating or copying files from my Ansible box to 
windows. Commands like reboot work fine. But any command that involves a 
PATH gives me this error.

My command (C&P from Ansible's site)

- name: Touch a file (creates if not present, updates modification time if 
present)
       win_file:
        path: C:\foo.conf
        state: touch

The error:


fatal: [XX.XXX.XX.112]: FAILED! => {
    "failed": true,
    "msg": "#< CLIXML\r\n<Objs Version=\"1.1.0.1\" 
xmlns=\"http://schemas.microsoft.com/powershell/2004/04\";><S 
S=\"Error\">Exception calling \"Create\" with \"1\" argument(s): \"The 
given path's format is no_x000D__x000A_</S><S S=\"Error\">t 
supported.\"_x000D__x000A_</S><S S=\"Error\">At line:6 
char:31_x000D__x000A_</S><S S=\"Error\">+ $fd = [System.IO.File]::Create 
&lt;&lt;&lt;&lt; ($path)_x000D__x000A_</S><S S=\"Error\">    + 
CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE 
_x000D__x000A_</S><S S=\"Error\">   xception_x000D__x000A_</S><S 
S=\"Error\">    + FullyQualifiedErrorId : 
DotNetMethodException_x000D__x000A_</S><S S=\"Error\"> 
_x000D__x000A_</S></Objs>"
}

I've tried everything, uppercase drive letter, double \, quotes. What am I 
doing wrong here?

Thanks!!

-- 
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/8f3b3c48-1090-4fb1-986e-3ebb3e7f0071%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to