vSphere Playbook runs from Ansible Tower but not when run with Ansible-Playbook

114 views
Skip to first unread message

david....@bmt.ky

unread,
Jun 30, 2021, 10:34:46 AM6/30/21
to Ansible Project
I've written a playbook to interact with a VMWare vSphere instance I have which will start up a set of VMs however I'm running into an issue where I can't run the playbook using ansible-playbook but I can run it from within Tower.

I have the community.vmware module installed on my node.

The error I'm getting relates to  PyVmomi not being installed or unable to be found by ansible-playbook:

"Failed to import the required Python library (PyVmomi) on bmtower-3-01's Python /usr/libexec/platform-python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"

Any help would be much appreciated!

Thanks

Wei-Yen Tan

unread,
Jun 30, 2021, 10:38:08 AM6/30/21
to ansible...@googlegroups.com
Yoy need to install the pyvomi  through pip on your machine.  Create a virtual environment if needed 

From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of david....@bmt.ky <david....@bmt.ky>
Sent: Thursday, July 1, 2021 2:34:46 AM
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] vSphere Playbook runs from Ansible Tower but not when run with Ansible-Playbook
 
--
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/ae3ea66e-3ba3-4256-974f-b44665955daan%40googlegroups.com.

david....@bmt.ky

unread,
Jun 30, 2021, 12:11:38 PM6/30/21
to Ansible Project
Thanks a ton! 

Installed PyVmomi and everything's up and running again

Reply all
Reply to author
Forward
0 new messages