Introduction
community.vmware is the Ansible collection that provides modules, inventory plugins and module utilities for automating VMware vSphere and vCenter environments (managing VMs, clusters, hosts, datastores, content libraries, and more). Version 7.0.0 is a major release that follows 6.4.0 and, unlike a typical minor bump, it removes a large number of previously deprecated modules, methods and options. Anyone upgrading from the 6.x series needs to review the porting guide before running existing playbooks against this version.
Whats New
Breaking Changes
The headline change in 7.0.0 is a raised minimum requirement:
- Support for
ansible-core < 2.21.0has been removed. Environments still runningansible-core2.20 or older must upgradeansible-corebefore installing this collection version.
Removed Features (previously deprecated)
All of the following were deprecated in earlier 6.x releases and are now gone. Playbooks and custom code still referencing them will break.
Removed module_utils methods and functions
| Module util | Removed item | Reference |
|---|---|---|
module_utils.vm_device_helper | PyVmomiDeviceHelper.is_nvdimm_controller | PR #2314 |
module_utils.vm_device_helper | PyVmomiDeviceHelper.is_nvdimm_device | PR #2314 |
module_utils.vmware | PyVmomi.find_vmdk_file | PR #2314 |
module_utils.vmware | PyVmomi.host_version_at_least | Issue #2309 |
module_utils.vmware | PyVmomi.network_exists_by_name | PR #2314 |
module_utils.vmware | PyVmomi.vmdk_disk_path_split | PR #2314 |
module_utils.vmware | connect_to_api function | Issue #2465 |
module_utils.vmware | find_host_portgroup_by_name function / PyVmomi.find_host_portgroup_by_name method | PR #2314 |
module_utils.vmware_rest_client | VmwareRestClient.get_folder_by_name | PR #2314 |
plugin_utils.inventory | deprecated plugin util | Issue #2292 |
plugins.httpapi | deprecated httpapi plugin | Issue #2310 |
Removed modules and inventory plugins (with replacements)
| Removed | Replacement | Reference |
|---|---|---|
vcenter_folder | vmware.vmware.folder | Issue #2358 |
vmware_cluster_ha | vmware.vmware.cluster_ha | Issue #2333 |
vmware_cluster_info | vmware.vmware.cluster_info | Issue #2261 |
vmware_content_deploy_ovf_template | vmware.vmware.deploy_content_library_ovf | Issue #2334 |
vmware_content_deploy_template | vmware.vmware.deploy_content_library_template | Issue #2334 |
vmware_content_library_manager | vmware.vmware.local_content_library and vmware.vmware.subscribed_content_library | Issue #2359 |
vmware_guest_powerstate | vmware.vmware.vm_powerstate | Issue #2440 |
vmware_host | vmware.vmware.esxi_host and vmware.vmware.esxi_connection | Issue #2341 |
vmware_host_inventory | vmware.vmware.esxi_hosts | (community.vmware issue tracker) |
Also note: vmware_dvs_portgroup has lost the deprecated mac_learning option. Use network_policy.mac_learning instead (Issue #2466).
Upgrade Checklist
Before pinning community.vmware>=7.0.0 in a requirements.yml or CI pipeline:
- Confirm
ansible-coreis at 2.21.0 or newer. - Grep playbooks/roles for any of the module names in the tables above and swap them for the
vmware.vmwareequivalents. - If custom modules or
module_utilsimport the removed methods/functions directly, update those imports. - Re-run the test suite / molecule scenarios against the new version before promoting it in production.
Installation and Verification
# Install the latest community.vmware collection
ansible-galaxy collection install community.vmware
# Or force-install a specific version
ansible-galaxy collection install community.vmware:==7.0.0
# Verify the installed version
ansible-galaxy collection list community.vmware
# Check ansible-core version compatibility
ansible --version
If using a requirements.yml:
collections:
- name: community.vmware
version: ">=7.0.0"
ansible-galaxy collection install -r requirements.yml