If you just want the script without the reading, download it here
Integrating Ansible into vRA is a fantastic feature and not that hard to setup. VMware document the process themselves, and there are other numerous blog posts covering it as well, like this one or this one. Unfortunately, I found that to get it working properly, I needed to bring together information from multiple sources (VMware’s documentation didn’t cut it for me on its own). To make life simple, I wrote myself a bash script to install Ansible and configure it for integration with vRA 8.
Building the Ansible Host
I started by building myself a virtual machine to act as the Ansible control node, with the following specification
Item | Value/Amount |
---|---|
vCPU | 2 |
Ram (GB) | 16 |
Disk | 40GB |
Network Adaptor | vmxnet3 |
Once created I installed the O/S and configured it as per the table below
Item | Value/Amount |
---|---|
O/S | Centos8 (minimal) |
Name in o/s set | Yes |
Static IP address set? | Yes |
DNS record created (forward and reverse) | Yes |
Updated with yum update? | Yes |
Internet access required? | Yes |
Installed packages | git, open-vm-tools, wget, dos2Unix, curl, nano |
Once the virtual machine was provisioned,
- I logged in as root
- I copied my bash script into the /tmp folder (Winscp is your friend here)
- I ensured that it was executable, by using chmod +x /tmp/setup_ansible_opensource_for_vra_integration.sh
- Executed the script ./tmp/setup_ansible_opensource_for_vra_integration.sh

When executing the script you will need to input the username and password for the new account that will be used for Ansible integration
Once the execution was complete, I checked the logfile for any errors (/tmp/ansible_setup_helper_log).
Since it was clear of errors, I switched over to my vRA 8.4 installation and configured the Ansible open source integration. The integration configuration in vRA is very straightforward and self explanatory, as per the screenshot below. Once validated and saved the integration is ready for incorporating in to your cloud templates.