Deploying vSphere Replication with Ansible

Recently, myself and some colleagues where tasked to automate the installation and configuration of a VMware DR solution. This involved the deployment and configuration of SRM and vSphere Replication to be production ready once all automation was complete. This proved a little tricky due to lack of APIs for some of the products, however in this blog post I wanted to show how I deployed vSphere Replication using Ansible, which was the automation tool of choice for this project.

Create Pre-Requisites

If you have deployed vSphere Replication before, then you know that there are some pre-requisites that may be required, depending on your design decisions. I won’t discuss here how we created AD groups, accounts etc as this was all done using another role but these are all pretty easily automated.

The main requirement was to have a separate NIC for replication traffic on my appliances. The new role created was the port groups for replication. This can be done using the OTB vmware_dvs_portgroup Ansible module. Here I am creating creating the port group , assigning the teaming policy and various other requirements.

Continue reading