# Ansible Playbook using ansible\_connection: vmware\_tools

**URL:** <https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687>\
**Category:** Ansible Project\
**Created:** [February 26, 2021, 1:37am UTC](https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687 "2021-02-26T01:37:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen\_Collins](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glen\_Collins](https://forum.ansible.com/u/Glen_Collins)\
**Post date:** [February 26, 2021, 1:37am UTC](https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687/1 "2021-02-26T01:37:40Z")

</div>

Hello.

I am trying to use the ansible\_connection: vmware\_tools in my playbook. I have been successful in connecting and running basic commands. But I am finding when using modules like yum and there is a long task to do such a patching a linux server after being 1st built the playbook comes back with an error saying “The guest operations agent could not be contacted” and my playbook fails. I go to the server and do a yum update and it’s been fully patched. It seems to me there is a timeout issues waiting for the command to complete.

For the life of me have been unable to find any timeout parameters for the vmtools using the ansible\_connection and that fails. When I tried ansible\_command\_timeout the module also failed.

After the failure I ran the playbook again and it came back saying there was nothing to be done. So I know the command worked and patched the server but still I"m unable to find any kind of timeout parameter for this functionally.

Any ideas?

I know I can use the command with standard SSH connection but I’m trying something new that might help use with other issues. I would like to get the vmtools connection to work as it should and expected to work.

Any help would be appreciated.

Thanks.

Glen

---

<div class="post-metadata">

**Author:** ![Glen\_Collins](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glen\_Collins](https://forum.ansible.com/u/Glen_Collins)\
**Post date:** [February 26, 2021, 2:45pm UTC](https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687/2 "2021-02-26T14:45:05Z")

</div>

This might help…

Here is the pertinent portions of my playbook using the command module…

---

<div class="post-metadata">

**Author:** ![Glen\_Collins](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glen\_Collins](https://forum.ansible.com/u/Glen_Collins)\
**Post date:** [February 26, 2021, 2:50pm UTC](https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687/3 "2021-02-26T14:50:06Z")

</div>

I am using ansible version:

ansible 2.9.15  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /bin/ansible  
python version = 2.7.5 (default, Aug 13 2020, 02:51:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

Thanks.

Glen

---

<div class="post-metadata">

**Author:** ![Glen\_Collins](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glen\_Collins](https://forum.ansible.com/u/Glen_Collins)\
**Post date:** [February 26, 2021, 3:54pm UTC](https://forum.ansible.com/t/ansible-playbook-using-ansible-connection-vmware-tools/34687/4 "2021-02-26T15:54:35Z")

</div>

Well I feel stupid! This is not a timeout issue but the fact the vmtools is being patched. Something that didn’t cross my mind before looking at all the process during the patching process. Actually saw the command to restart the vmtools agent.

So no issue at all.

Thanks

Glen
