install vmware tools via ansible playbook (winrm)

90 views
Skip to first unread message

Shay Cohen

unread,
Mar 10, 2023, 6:11:06 PM3/10/23
to Ansible Project

.I am trying to install a vmare tools on windows machine but noting happen
I manage to copy the file but when I am trying to install I don't see any error or installation running in the background.

---
- hosts: all
  tasks:
    - name: Copy a single file vmare-tools
      ansible.windows.win_copy:
        src: /etc/ansible/roles/vmware_tools/files/VMware-tools-12.1.5-20735119-x86_64.exe
        dest: C:\VMware-tools-12.1.5-20735119-x86_64.exe
    - name: Install vmware tools
      ansible.windows.win_command: '"C:\VMware-tools-12.1.5-20735119-x86_64.exe" /S /v"/qn REBOOT=R ADDLOCAL=ALL REMOVE=AppDefense,FileIntrospection,NetworkIntrospection,Hgfs" /ru SYSTEM /rl HIGHEST /l C:\VMwareToolsInstall.log'

Will McDonald

unread,
Mar 10, 2023, 6:29:42 PM3/10/23
to ansible...@googlegroups.com
It's hard to tell from the mail formatted commands but thoughts off the top of my head:

1. /S /v"/qn looks like it might need an additional space: /v "/qn
2. Have you tried to register the output of the task and then subsequently inspect that? If so... what's the output?
3. Have you tried using the argv parameter to see if that helps C:\VMware-tools-12.1.5-20735119-x86_64.exe parse its arguments more cleanly?
4. If you drop that heavily quoted command line into a powershell or batch/command instead and copy then call it... what happens? (Purely from a debug/problem reduction perspective?


--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/38f6a909-538a-4848-997d-163b94c238aan%40googlegroups.com.

Thanh Nguyen Duc

unread,
Mar 10, 2023, 9:34:18 PM3/10/23
to ansible...@googlegroups.com
Does command work locally? If can then you may try to create a bat file then trigger it instead?

Thanks and Best Regards,

Thanh.

On 11 Mar 2023, at 07:29, Will McDonald <wmcd...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages