vRealize Automation is now more feature rich than ever with our latest integration with Ansible Tower. We announced our continued support for Ansible Open Source last year and customers have benefited from that integration by combining vRealize Automation’s automation capabilities with Ansible’s robust engine for configuration management.
With the Ansible integration customers have been able to add an Ansible Control Machine (or Host) to the Cloud Assembly section of vRealize Automation and thus run playbooks as part of the provisioning process and lifecyle of the machine.
With support for Ansible Tower customers can run Ansible Tower Job Templates from our blueprint canvas. By incorporating existing Ansible Tower instances into vRealize Automation customers have yet another option for configuration management along with Puppet and Ansible Open Source. vRealize Automation is part of VMware’s Multi-Cloud Management portfolio and that means that the Ansible Tower and/or Engine can be on-prem or in the cloud, the nodes that will be managed or deployed could also be on-prem or in the cloud. This provides maximum flexibility when integrating with these solutions.
Ansible Tower Quick Facts
- Ansible Tower versions 3.5 and 3.6 are currently supported
- vRealize Automation 8.1 and later supported (on-prem)
- vRealize Automation Cloud supported (cloud proxy needed for vCenter communication)
Configuring Ansible Tower Integration
Ansible Tower runs on top of Ansible Engine, so for the purposes of this blog we will not discuss Ansible Engine playbook provisioning specifically since that is discussed in this blog Ansible Integration Comes to Cloud Assembly The primary topic of this blog will be to discuss the Ansible Tower setup and integration with vRealize Automation. Also this blog assumes you have setup the appropriate Cloud Zones, Image Mappings etc in Cloud Assembly.
Once you have Ansible Tower installed on your Ansible Control Machine go to Cloud Assembly—->Infrastructure—->Integrations. There you will see the Ansible Tower icon, click on that.
Next you can add the configuration of your Ansible Tower. Not much is needed here, keep in mind that location refers to on-prem (cloud proxy) or outside of vSphere perhaps in a public cloud.
Once the integration is complete you can then add Ansible Tower job templates to your Cloud Assembly Blueprints. In order to do that go to Cloud Assembly—->Blueprints. Here is a sample of the Ansible Tower YAML section within a blueprint:
The Cloud_Ansible_Tower resource type contains the following properties:
This blueprint is simply just calling on Ansible Tower to run the “Demo Job Template” job template from within Ansible Tower. If you are going to connect to the node machine via SSH( username/password or private key files ), then that would need to be configured from within Ansible Tower. The Ansible Icon on the left hand pane from within the blueprint canvas can also be “dragged” onto the canvas and then you can configure the parameters.
Note: From within Ansible Tower you will need to check the “Prompt on Launch” box above the Limit field for the job template you are going to run from the blueprint. This will ensure that the playbook only runs on the node that gets deployed along with the blueprint.
Now you should be ready to publish the blueprint to the Service Broker catalog within vRealize Automation or you can test the deployment by just clicking “Deploy” on the blueprint canvas. For our purposes here I will request this item from Service Broker. If you are unfamiliar with Service Broker then read all about it here – Cloud Automation Services – Service Broker Technical Overview
Once the job template was successfully run you can go into Cloud Assembly or Ansible Tower –> Jobs and see the Status of the job. The images below show both Ansible Tower and Cloud Assembly, and that the machine with IP Address 192.168.100.115 was deployed and the playbook ran against it.
This latest integration is just one of many features in vRealize Automation that are helping organizations deliver applications and services to the business with speed and agility. With integrations like Kubernetes, IPAM, Ansible, OpenShift, Terraform just to name a few, vRealize Automation can provide answers for many use cases that your business has when it comes to provisioning and delivery.
To learn more about our Ansible integration check out these blogs:
Use Cloud Assembly Blueprint to deploy Ansible Control Machine
Cloud Assembly VM Guest Management With Ansible
Cloud Assembly – Ansible Integration Video