Personally, I would bypass the batch file and just call the executable 
directly like

- name: install Cygwin
  win_command: C:\Users\pkmbuilder\setup-x86_64.exe --root C:\cygwin64 
--quiet-mode --site http://cygwin.mirror.constant.com --packages 
"openssh,rsync,zip,vim,wget"

# Note if you are using an Ansible version before 2.4, change 
"openssh,rsync,zip,vim,wget" to \"openssh,rsync,zip,vim,wget\". If you are 
on 2.4 keep it as it is

This way you aren't reliant on a file being present on the server and are 
bypassing cmd which could obfuscate some results. You can also use 
win_package but you would need to determine the product id before hand but 
doing so would give you some idempotency.

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/40712154-453f-4b5a-894f-7483439f90f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to