cloud,

Ansible for VMware

Follow · 1 min read
Share this

Ref: VMware Guide for Ansible

.1. Requirements

Ansible VMware modules are written on top of pyVmomi which is the Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, and vCenter infrastructure.

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py

$ pip install pyvmomi

.2. vmware_guest module

The vmware_guest module manages various operations related to virtual machines in the given ESXi or vCenter server.

.3. VMware Prerequisites

.3.1. Installing vCenter SSL certificates for Ansible

From any web browser, go to the base URL of the vCenter Server without port number like https://vcenter-domain.example.com Click the “Download trusted root CA certificates” link at the bottom of the grey box on the right and download the file. Change the extension of the file to .zip. The file is a ZIP file of all root certificates and all CRLs. Extract the contents of the zip file. The extracted directory contains a .certs directory that contains two types of files. Files with a number as the extension (.0, .1, and so on) are root certificates. Install the certificate files are trusted certificates by the process that is appropriate for your operating system.

.3.2. Installing ESXi SSL certificates for Ansible

Enable SSH Service on ESXi either by using Ansible VMware module vmware_host_service_manager or manually using vSphere Web interface. SSH to ESXi server using administrative credentials, and navigate to directory /etc/vmware/ssl Secure copy (SCP) rui.crt located in /etc/vmware/ssl directory to Ansible control node. Install the certificate file by the process that is appropriate for your operating system.

1. Appendix

1.1. VMWware Templates

https://www.nakivo.com/blog/vm-templates-a-to-z/

Latest Stories

CKA & CKAD - Kubernetes Exam Tips, Learning Path and Certification

Since kubernetes is getting wide acceptance, Kubernetes Certification is the most trending one in IT circle now. I have completed both recently (March – April 2020) and I started gett...

In kubernetes, May 03, 2020
Start Your OpenShift Journey with these Free Red Hat Training Programs

Red Hat OpenShift Container Platform is one of the best kubernetes platform for enterprises. As we know kubernetes and OpenShift are multi-component stack and not easy to learn withou...

In openshift, Mar 09, 2020
Installing oVirt 4 with Self-Hosted Engine on Enterprise Linux

oVirt is one of the best free and open-source virtualization solution with enterprise level features. Installing oVirt cluster is simple and straight forward and you can refer the ins...

In oVirt, Mar 05, 2020
ansible-tower-service, Start or Stop Ansible Tower

As we know, Ansible Tower is a multi-component system including Ansible, Tower API, RabbitMQ, Database (managed or external) etc. And will be more complicated when you install Ansible...

In ansible, Feb 19, 2020

Featured