/vmware.vmware_rest

Ansible Collection for VMWare (REST modules)

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Ansible Collection: vmware.vmware_rest

This repo hosts the vmware.vmware_rest Ansible Collection.

The collection includes the VMware modules and plugins supported by Ansible VMware community to help the management of VMware infrastructure. These modules are different from community.vmware since they are based upon VMware vSphere REST API interface and not relying on any third party libraries such as Pyvmomi and vSphere Automation SDK for Python.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Content

Modules

Name Description
vmware.vmware_rest.vcenter_cluster_info Collect the information associated with the vCenter clusters
vmware.vmware_rest.vcenter_datacenter Manage the datacenter of a vCenter
vmware.vmware_rest.vcenter_datacenter_info Collect the information associated with the vCenter datacenters
vmware.vmware_rest.vcenter_datastore_info Collect the information associated with the vCenter datastores
vmware.vmware_rest.vcenter_folder_info Collect the information associated with the vCenter folders
vmware.vmware_rest.vcenter_host Manage the host of a vCenter
vmware.vmware_rest.vcenter_host_info Collect the information associated with the vCenter hosts
vmware.vmware_rest.vcenter_network_info Collect the information associated with the vCenter networks
vmware.vmware_rest.vcenter_resourcepool Manage the resourcepool of a vCenter
vmware.vmware_rest.vcenter_resourcepool_info Collect the information associated with the vCenter resourcepools
vmware.vmware_rest.vcenter_storage_policies_info Collect the information associated with the vCenter storage policiess
vmware.vmware_rest.vcenter_vm Manage the vm of a vCenter
vmware.vmware_rest.vcenter_vm_guest_identity_info Collect the guest identity information
vmware.vmware_rest.vcenter_vm_guest_localfilesystem_info Collect the guest localfilesystem information
vmware.vmware_rest.vcenter_vm_guest_networking_info Collect the guest networking information
vmware.vmware_rest.vcenter_vm_guest_networking_interfaces_info Collect the guest networking interfaces information
vmware.vmware_rest.vcenter_vm_guest_networking_routes_info Collect the guest networking routes information
vmware.vmware_rest.vcenter_vm_hardware Manage the hardware of a VM
vmware.vmware_rest.vcenter_vm_hardware_adapter_sata Manage the SATA adapter of a VM
vmware.vmware_rest.vcenter_vm_hardware_adapter_sata_info Collect the SATA adapter information from a VM
vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi Manage the SCSI adapter of a VM
vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi_info Collect the SCSI adapter information from a VM
vmware.vmware_rest.vcenter_vm_hardware_boot Manage the boot of a VM
vmware.vmware_rest.vcenter_vm_hardware_boot_device Manage the boot device of a VM
vmware.vmware_rest.vcenter_vm_hardware_boot_device_info Collect the boot device information from a VM
vmware.vmware_rest.vcenter_vm_hardware_boot_info Collect the boot information from a VM
vmware.vmware_rest.vcenter_vm_hardware_cdrom Manage the cdrom of a VM
vmware.vmware_rest.vcenter_vm_hardware_cdrom_info Collect the cdrom information from a VM
vmware.vmware_rest.vcenter_vm_hardware_cpu Manage the cpu of a VM
vmware.vmware_rest.vcenter_vm_hardware_cpu_info Collect the cpu information from a VM
vmware.vmware_rest.vcenter_vm_hardware_disk Manage the disk of a VM
vmware.vmware_rest.vcenter_vm_hardware_disk_info Collect the disk information from a VM
vmware.vmware_rest.vcenter_vm_hardware_ethernet Manage the ethernet of a VM
vmware.vmware_rest.vcenter_vm_hardware_ethernet_info Collect the ethernet information from a VM
vmware.vmware_rest.vcenter_vm_hardware_floppy Manage the floppy of a VM
vmware.vmware_rest.vcenter_vm_hardware_floppy_info Collect the floppy information from a VM
vmware.vmware_rest.vcenter_vm_hardware_info Manage the info of a VM
vmware.vmware_rest.vcenter_vm_hardware_memory Manage the memory of a VM
vmware.vmware_rest.vcenter_vm_hardware_memory_info Collect the memory information from a VM
vmware.vmware_rest.vcenter_vm_hardware_parallel Manage the parallel of a VM
vmware.vmware_rest.vcenter_vm_hardware_parallel_info Collect the parallel information from a VM
vmware.vmware_rest.vcenter_vm_hardware_serial Manage the serial of a VM
vmware.vmware_rest.vcenter_vm_hardware_serial_info Collect the serial information from a VM
vmware.vmware_rest.vcenter_vm_info Collect the information from a VM
vmware.vmware_rest.vcenter_vm_libraryitem_info Collect the libraryitem information from a VM
vmware.vmware_rest.vcenter_vm_power Manage the power of a VM
vmware.vmware_rest.vcenter_vm_power_info Collect the power information from a VM
vmware.vmware_rest.vcenter_vm_storage_policy Manage the storage policy of a VM
vmware.vmware_rest.vcenter_vm_storage_policy_compliance_info Collect the storage policy compliance information from a VM
vmware.vmware_rest.vcenter_vm_storage_policy_info Collect the storage policy information from a VM
vmware.vmware_rest.vcenter_vm_tools Manage the tools of a VM
vmware.vmware_rest.vcenter_vm_tools_info Collect the tools information from a VM

Installation and Usage

Install the dependencies

This collection depends on Python 3.6 or greater and aiohttp.

You can either install aiohttp using your OS package manager or using Python virtual environment.

Notes: For RHEL, there is no python3-aiohttp package available (yet), you can either get it from EPEL or install aiohttp using pip.

Installing the Collection from Ansible Galaxy

Before using the VMware collection, you need to install the collection with the ansible-galaxy CLI:

ansible-galaxy collection install vmware.vmware_rest

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
- name: vmware.vmware_rest

Documentation

The VMware REST modules guide gives a step by step introduction of the collection.

Testing and Development

Please, don't open Pull Request against the vmware_rest repository. We use a project called vmware_rest_code_generate to generate these modules and your change would be lost.

Testing with ansible-test

virtualenv -p python3.7 .virtualenv/py37  # Or any other version greater than 3.6
source .virtualenv/py37/bin/activate
pip install -r requirements.txt -r test-requirements.txt
ansible-test network-integration --python 3.7 --inventory /tmp/inventory-vmware_rest vcenter_vm_scenario1

Communication

We have a dedicated Working Group for VMware. You can find other people interested in this in #ansible-vmware on Freenode IRC. For more information about communities, meetings and agendas see https://github.com/ansible/community/wiki/VMware.

License

GNU General Public License v3.0 or later

See LICENSE to see the full text.