vmwareansiblevmware-tools

Get service tool error when trying to install vmware tools


I am trying to install vmware tools on an EXSi host. This is the code I have to do it.

---
- hosts: my-host


  tasks:

      - name: Install VMware tools 
        yum: pkg="open-vm-tools" state=present
        when: ansible_os_family == "RedHat"

      - name: Enabling and starting -> vmtoolsd 
        service: name=vmtoolsd enabled=yes state=started

This is the error I get after I run the code.

PLAY [my-host]


TASK [setup] ******************************************************************* ok: [myhost.com]

TASK [Install VMware tools] **************************************************** skipping: [myhost.com]

TASK [Enabling and starting -> vmtoolsd] *************************************** fatal: [myhost.com]: FAILED! => {"changed": false, "failed": true, "msg": "get_service_tools not implemented on target platform"}

NO MORE HOSTS LEFT ************************************************************* [WARNING]: Could not create retry file 'vmwaretools.retry'.
[Errno 2] No such file or directory: ''

PLAY RECAP ********************************************************************* myhost.com : ok=1 changed=0 unreachable=0
failed=1

This is the host file i am using.

[my-host] myhost.com ansible_ssh_pass=mypw ansible_ssh_user=root

How can I implement get_service_tools on my host like the error message points out? I am fairly new to all of this so please pardon the naiveté. Thanks


Solution

  • Answer from comment:

    As in the previous question, you need to execute tasks on your guest hosts, not on your host esxi.