Skip to content

Latest commit

 

History

History
254 lines (207 loc) · 37.5 KB

README.md

File metadata and controls

254 lines (207 loc) · 37.5 KB

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.

For collections that support Ansible 2.9, please ensure you update your network_os to use the fully qualified collection name (for example, cisco.ios.ios). 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.

Python version compatibility

The collection depends on aiohttp has requirement which requires Python 3.6 or greater.

vSphere compatibility

The 2.0.0 version of this collection requires vSphere 7.0.2 or greater.

Known limitations

VM Template and folder structure

These modules are based on the vSphere REST API. This API doesn't provide any mechanism to list or clone VM templates when they are stored in a VM folder. To circumvent this limitation, you should store your VM templates in a Content Library.

Installation and Usage

Install the dependencies

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

Content

Lookup plugins

Name Description
vmware.vmware_rest.cluster_moid Look up MoID for vSphere cluster objects using vCenter REST API
vmware.vmware_rest.datacenter_moid Look up MoID for vSphere datacenter objects using vCenter REST API
vmware.vmware_rest.datastore_moid Look up MoID for vSphere datastore objects using vCenter REST API
vmware.vmware_rest.folder_moid Look up MoID for vSphere folder objects using vCenter REST API
vmware.vmware_rest.host_moid Look up MoID for vSphere host objects using vCenter REST API
vmware.vmware_rest.network_moid Look up MoID for vSphere network objects using vCenter REST API
vmware.vmware_rest.resource_pool_moid Look up MoID for vSphere resource pool objects using vCenter REST API
vmware.vmware_rest.vm_moid Look up MoID for vSphere vm objects using vCenter REST API

Modules

Name Description
vmware.vmware_rest.appliance_access_consolecli Set enabled state of the console-based controlled CLI (TTY1).
vmware.vmware_rest.appliance_access_consolecli_info Get enabled state of the console-based controlled CLI (TTY1).
vmware.vmware_rest.appliance_access_dcui Set enabled state of Direct Console User Interface (DCUI TTY2).
vmware.vmware_rest.appliance_access_dcui_info Get enabled state of Direct Console User Interface (DCUI TTY2).
vmware.vmware_rest.appliance_access_shell Set enabled state of BASH, that is, access to BASH from within the controlled CLI.
vmware.vmware_rest.appliance_access_shell_info Get enabled state of BASH, that is, access to BASH from within the controlled CLI.
vmware.vmware_rest.appliance_access_ssh Set enabled state of the SSH-based controlled CLI.
vmware.vmware_rest.appliance_access_ssh_info Get enabled state of the SSH-based controlled CLI.
vmware.vmware_rest.appliance_health_applmgmt_info Get health status of applmgmt services.
vmware.vmware_rest.appliance_health_database_info Returns the health status of the database.
vmware.vmware_rest.appliance_health_databasestorage_info Get database storage health.
vmware.vmware_rest.appliance_health_load_info Get load health.
vmware.vmware_rest.appliance_health_mem_info Get memory health.
vmware.vmware_rest.appliance_health_softwarepackages_info Get information on available software updates available in the remote vSphere Update Manager repository
vmware.vmware_rest.appliance_health_storage_info Get storage health.
vmware.vmware_rest.appliance_health_swap_info Get swap health.
vmware.vmware_rest.appliance_health_system_info Get overall health of system.
vmware.vmware_rest.appliance_infraprofile_configs Exports the desired profile specification.
vmware.vmware_rest.appliance_infraprofile_configs_info List all the profiles which are registered.
vmware.vmware_rest.appliance_localaccounts_globalpolicy Set the global password policy.
vmware.vmware_rest.appliance_localaccounts_globalpolicy_info Get the global password policy.
vmware.vmware_rest.appliance_localaccounts_info Get the local user account information.
vmware.vmware_rest.appliance_monitoring_info Get monitored item info
vmware.vmware_rest.appliance_monitoring_query Get monitoring data.
vmware.vmware_rest.appliance_networking Reset and restarts network configuration on all interfaces, also this will renew the DHCP lease for DHCP IP address.
vmware.vmware_rest.appliance_networking_dns_domains Set DNS search domains.
vmware.vmware_rest.appliance_networking_dns_domains_info Get list of DNS search domains.
vmware.vmware_rest.appliance_networking_dns_hostname Set the Fully Qualified Domain Name.
vmware.vmware_rest.appliance_networking_dns_hostname_info Get the Fully Qualified Doman Name.
vmware.vmware_rest.appliance_networking_dns_servers Set the DNS server configuration
vmware.vmware_rest.appliance_networking_dns_servers_info Get DNS server configuration.
vmware.vmware_rest.appliance_networking_firewall_inbound Set the ordered list of firewall rules to allow or deny traffic from one or more incoming IP addresses
vmware.vmware_rest.appliance_networking_firewall_inbound_info Get the ordered list of firewall rules
vmware.vmware_rest.appliance_networking_info Get Networking information for all configured interfaces.
vmware.vmware_rest.appliance_networking_interfaces_info Get information about a particular network interface.
vmware.vmware_rest.appliance_networking_interfaces_ipv4 Set IPv4 network configuration for specific network interface.
vmware.vmware_rest.appliance_networking_interfaces_ipv4_info Get IPv4 network configuration for specific NIC.
vmware.vmware_rest.appliance_networking_interfaces_ipv6 Set IPv6 network configuration for specific interface.
vmware.vmware_rest.appliance_networking_interfaces_ipv6_info Get IPv6 network configuration for specific interface.
vmware.vmware_rest.appliance_networking_noproxy Sets servers for which no proxy configuration should be applied
vmware.vmware_rest.appliance_networking_noproxy_info Returns servers for which no proxy configuration will be applied.
vmware.vmware_rest.appliance_networking_proxy Configures which proxy server to use for the specified protocol
vmware.vmware_rest.appliance_networking_proxy_info Gets the proxy configuration for a specific protocol.
vmware.vmware_rest.appliance_ntp Set NTP servers
vmware.vmware_rest.appliance_ntp_info Get the NTP configuration status
vmware.vmware_rest.appliance_services Restarts a service
vmware.vmware_rest.appliance_services_info Returns the state of a service.
vmware.vmware_rest.appliance_shutdown Cancel pending shutdown action.
vmware.vmware_rest.appliance_shutdown_info Get details about the pending shutdown action.
vmware.vmware_rest.appliance_system_globalfips Enable/Disable Global FIPS mode for the appliance
vmware.vmware_rest.appliance_system_globalfips_info Get current appliance FIPS settings.
vmware.vmware_rest.appliance_system_storage Resize all partitions to 100 percent of disk size.
vmware.vmware_rest.appliance_system_storage_info Get disk to partition mapping.
vmware.vmware_rest.appliance_system_time_info Get system time.
vmware.vmware_rest.appliance_system_time_timezone Set time zone.
vmware.vmware_rest.appliance_system_time_timezone_info Get time zone.
vmware.vmware_rest.appliance_system_version_info Get the version.
vmware.vmware_rest.appliance_timesync Set time synchronization mode.
vmware.vmware_rest.appliance_timesync_info Get time synchronization mode.
vmware.vmware_rest.appliance_update_info Gets the current status of the appliance update.
vmware.vmware_rest.appliance_vmon_service Lists details of services managed by vMon.
vmware.vmware_rest.appliance_vmon_service_info Returns the state of a service.
vmware.vmware_rest.content_configuration Updates the configuration
vmware.vmware_rest.content_configuration_info Retrieves the current configuration values.
vmware.vmware_rest.content_library_item_info Returns the {@link ItemModel} with the given identifier.
vmware.vmware_rest.content_locallibrary Creates a new local library.
vmware.vmware_rest.content_locallibrary_info Returns a given local library.
vmware.vmware_rest.content_subscribedlibrary Creates a new subscribed library
vmware.vmware_rest.content_subscribedlibrary_info Returns a given subscribed library.
vmware.vmware_rest.vcenter_cluster_info Retrieves information about the cluster corresponding to {@param.name cluster}.
vmware.vmware_rest.vcenter_datacenter Create a new datacenter in the vCenter inventory
vmware.vmware_rest.vcenter_datacenter_info Retrieves information about the datacenter corresponding to {@param.name datacenter}.
vmware.vmware_rest.vcenter_datastore_info Retrieves information about the datastore indicated by {@param.name datastore}.
vmware.vmware_rest.vcenter_folder_info Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the {@link FilterSpec}.
vmware.vmware_rest.vcenter_host Add a new standalone host in the vCenter inventory
vmware.vmware_rest.vcenter_host_info Returns information about at most 2500 visible (subject to permission checks) hosts in vCenter matching the {@link FilterSpec}.
vmware.vmware_rest.vcenter_network_info Returns information about at most 1000 visible (subject to permission checks) networks in vCenter matching the {@link FilterSpec}.
vmware.vmware_rest.vcenter_ovf_libraryitem Creates a library item in content library from a virtual machine or virtual appliance
vmware.vmware_rest.vcenter_resourcepool Creates a resource pool.
vmware.vmware_rest.vcenter_resourcepool_info Retrieves information about the resource pool indicated by {@param.name resourcePool}.
vmware.vmware_rest.vcenter_storage_policies_info Returns information about at most 1024 visible (subject to permission checks) storage solicies availabe in vCenter
vmware.vmware_rest.vcenter_vm Creates a virtual machine.
vmware.vmware_rest.vcenter_vm_guest_customization Applies a customization specification on the virtual machine
vmware.vmware_rest.vcenter_vm_guest_filesystem_directories Creates a directory in the guest operating system
vmware.vmware_rest.vcenter_vm_guest_identity_info Return information about the guest.
vmware.vmware_rest.vcenter_vm_guest_localfilesystem_info Returns details of the local file systems in the guest operating system.
vmware.vmware_rest.vcenter_vm_guest_networking_info Returns information about the network configuration in the guest operating system.
vmware.vmware_rest.vcenter_vm_guest_networking_interfaces_info Returns information about the networking interfaces in the guest operating system.
vmware.vmware_rest.vcenter_vm_guest_networking_routes_info Returns information about network routing in the guest operating system.
vmware.vmware_rest.vcenter_vm_guest_operations_info Get information about the guest operation status.
vmware.vmware_rest.vcenter_vm_guest_power Issues a request to the guest operating system asking it to perform a soft shutdown, standby (suspend) or soft reboot
vmware.vmware_rest.vcenter_vm_guest_power_info Returns information about the guest operating system power state.
vmware.vmware_rest.vcenter_vm_hardware Updates the virtual hardware settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_adapter_sata Adds a virtual SATA adapter to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_adapter_sata_info Returns information about a virtual SATA adapter.
vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi Adds a virtual SCSI adapter to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi_info Returns information about a virtual SCSI adapter.
vmware.vmware_rest.vcenter_vm_hardware_boot Updates the boot-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_boot_device Sets the virtual devices that will be used to boot the virtual machine
vmware.vmware_rest.vcenter_vm_hardware_boot_device_info Returns an ordered list of boot devices for the virtual machine
vmware.vmware_rest.vcenter_vm_hardware_boot_info Returns the boot-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_cdrom Adds a virtual CD-ROM device to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_cdrom_info Returns information about a virtual CD-ROM device.
vmware.vmware_rest.vcenter_vm_hardware_cpu Updates the CPU-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_cpu_info Returns the CPU-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_disk Adds a virtual disk to the virtual machine
vmware.vmware_rest.vcenter_vm_hardware_disk_info Returns information about a virtual disk.
vmware.vmware_rest.vcenter_vm_hardware_ethernet Adds a virtual Ethernet adapter to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_ethernet_info Returns information about a virtual Ethernet adapter.
vmware.vmware_rest.vcenter_vm_hardware_floppy Adds a virtual floppy drive to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_floppy_info Returns information about a virtual floppy drive.
vmware.vmware_rest.vcenter_vm_hardware_info Returns the virtual hardware settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_memory Updates the memory-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_memory_info Returns the memory-related settings of a virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_parallel Adds a virtual parallel port to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_parallel_info Returns information about a virtual parallel port.
vmware.vmware_rest.vcenter_vm_hardware_serial Adds a virtual serial port to the virtual machine.
vmware.vmware_rest.vcenter_vm_hardware_serial_info Returns information about a virtual serial port.
vmware.vmware_rest.vcenter_vm_info Returns information about a virtual machine.
vmware.vmware_rest.vcenter_vm_libraryitem_info Returns the information about the library item associated with the virtual machine.
vmware.vmware_rest.vcenter_vm_power Operate a boot, hard shutdown, hard reset or hard suspend on a guest.
vmware.vmware_rest.vcenter_vm_power_info Returns the power state information of a virtual machine.
vmware.vmware_rest.vcenter_vm_storage_policy Updates the storage policy configuration of a virtual machine and/or its associated virtual hard disks.
vmware.vmware_rest.vcenter_vm_storage_policy_compliance Returns the storage policy Compliance {@link Info} of a virtual machine after explicitly re-computing compliance check.
vmware.vmware_rest.vcenter_vm_storage_policy_compliance_info Returns the cached storage policy compliance information of a virtual machine.
vmware.vmware_rest.vcenter_vm_storage_policy_info Returns Information about Storage Policy associated with a virtual machine's home directory and/or its virtual hard disks.
vmware.vmware_rest.vcenter_vm_tools Update the properties of VMware Tools.
vmware.vmware_rest.vcenter_vm_tools_info Get the properties of VMware Tools.
vmware.vmware_rest.vcenter_vm_tools_installer Connects the VMware Tools CD installer as a CD-ROM for the guest operating system
vmware.vmware_rest.vcenter_vm_tools_installer_info Get information about the VMware Tools installer.
vmware.vmware_rest.vcenter_vmtemplate_libraryitems Creates a library item in content library from a virtual machine
vmware.vmware_rest.vcenter_vmtemplate_libraryitems_info Returns information about a virtual machine template contained in the library item specified by {@param.name templateLibraryItem}

Documentation

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

Development

This collection can be generated using the content_builder tool. Please refer to the vmware module generation.

Release notes

See CHANGELOG.rst.

Releasing, Versioning and Deprecation

This collection follows Semantic Versioning. More details on versioning can be found in the Ansible docs.

We plan to regularly release new minor or bugfix versions once new features or bugfixes have been implemented.

Releasing the current major version happens from the main branch.

We currently are not planning any deprecations or new major releases like 2.0.0 containing backwards incompatible changes. If backwards incompatible changes are needed, we plan to deprecate the old behavior as early as possible. We also plan to backport at least bugfixes for the old major version for some time after releasing a new major version. We will not block community members from backporting other bugfixes and features from the latest stable version to older release branches, under the condition that these backports are of reasonable quality.

Communication

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

Code of Conduct

This repository adheres to the Ansible Community code of conduct

More information

License

GNU General Public License v3.0 or later

See LICENSE to see the full text.