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

Ram (GB)16
Network Adaptorvmxnet3

Once created I installed the O/S and configured it as per the table below

O/SCentos8 (minimal)
Name in o/s setYes
Static IP address set?Yes
DNS record created (forward and reverse)Yes
Updated with yum update?Yes
Internet access required?Yes
Installed packagesgit, open-vm-tools, wget, dos2Unix, curl, nano

Once the virtual machine was provisioned,

  1. I logged in as root
  2. I copied my bash script into the /tmp folder (Winscp is your friend here)
  3. I ensured that it was executable, by using chmod +x /tmp/setup_ansible_opensource_for_vra_integration.sh
  4. 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.




CIO at Sonar, Automation Practice Lead at Xtravirt and guitarist in The Waders. Loves IT, automation, programming, music

%d bloggers like this: