Which version of Ansible are you using?  There are some fixes in 2.0 that
addressed argument quoting and issues with spaces in paths.  Due to some
other recent issues, I might suggest trying 2.0.0-0.2.alpha2 instead of
latest devel.


On Fri, Sep 11, 2015 at 7:19 AM, Matt Gagliardi <[email protected]>
wrote:

> Good morning all!  I'm fairly new to Ansible but I've been banging away at
> it for several weeks and feel like I'm getting a decent understanding of
> it.  However I've run into an issue I'm struggling with.  I have a playbook
> for Windows Server 2012 R2...95% of it works great.  But I'm stuck on
> literally the last item I need to add.  I'm trying to use the raw module to
> call and .exe and pass in some arguments.  The path to the .exe has some
> spaces, as does on of the arguments.  This is a rough approximation of what
> I'm trying to do looks like:
>
> - name: Register database
>   raw: '"C:\\Program Files\\Company
> Name\\Dir3\\dir4\name.name.name.name.exe" --setupServer
> --product=ProductName --dbDir="C:\\Program Files\\Company Name\\Dir3\dir4"
> --server=host\\Instance --user=username --password=*****'
>
> FWIW those are single-quotes at the beginning and the end. I had issues
> getting the quotes "right" (still not 100% convinced they're healthy) but
> at this point the playbook at least runs (no trip-ups in the YAML parser)
> but I'm getting this:
>
> "C:\Program is not recognized as in internal or external command..."
>
> If I pull out the second bit with the path (the one for --dbDir=) I can
> get the .exe to run but I'm missing a required variable so it tanks.  I
> guess I'm screwing up something with the quoting but I can't figure out
> what the heck it is.  Could anyone give me a pointer or two here?
>
> Thanks!
> Matt
>
> --
> 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/29e83b57-3f45-4d41-a35d-155cecd79f03%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/29e83b57-3f45-4d41-a35d-155cecd79f03%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAH%2BKTJ4tF1%3D3_3_4Td_ik4zxiwAJwF9WxjojKEDXi6dBFogWqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to