1.. _vmware_requirements:
2
3********************
4VMware Prerequisites
5********************
6
7.. contents::
8   :local:
9
10Installing SSL Certificates
11===========================
12
13All vCenter and ESXi servers require SSL encryption on all connections to enforce secure communication. You must enable SSL encryption for Ansible by installing the server's SSL certificates on your Ansible control node or delegate node.
14
15If the SSL certificate of your vCenter or ESXi server is not correctly installed on your Ansible control node, you will see the following warning when using Ansible VMware modules:
16
17``Unable to connect to vCenter or ESXi API at xx.xx.xx.xx on TCP/443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)``
18
19To install the SSL certificate for your VMware server,  and run your Ansible VMware modules in encrypted mode, please follow the instructions for the server you are running with VMware.
20
21Installing vCenter SSL certificates for Ansible
22-----------------------------------------------
23
24* From any web browser, go to the base URL of the vCenter Server without port number like ``https://vcenter-domain.example.com``
25
26* Click the "Download trusted root CA certificates" link at the bottom of the grey box on the right and download the file.
27
28* Change the extension of the file to .zip. The file is a ZIP file of all root certificates and all CRLs.
29
30* 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.
31
32* Install the certificate files are trusted certificates by the process that is appropriate for your operating system.
33
34
35Installing ESXi SSL certificates for Ansible
36--------------------------------------------
37
38* Enable SSH Service on ESXi either by using Ansible VMware module `vmware_host_service_manager <https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py>`_ or manually using vSphere Web interface.
39
40* SSH to ESXi server using administrative credentials, and navigate to directory ``/etc/vmware/ssl``
41
42* Secure copy (SCP) ``rui.crt`` located in ``/etc/vmware/ssl`` directory to Ansible control node.
43
44* Install the certificate file by the process that is appropriate for your operating system.
45