community.vmware.vmware_vm_storage_policy – Create vSphere storage policies¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_vm_storage_policy
.
New in version 1.0.0: of community.vmware
Synopsis¶
A vSphere storage policy defines metadata that describes storage requirements for virtual machines and storage capabilities of storage providers.
Currently, only tag-based storage policy creation is supported.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Examples¶
- name: Create or update a vSphere tag-based storage policy
community.vmware.vmware_vm_storage_policy:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
name: "vSphere storage policy"
description: "vSphere storage performance policy"
tag_category: "performance_tier"
tag_name: "gold"
tag_affinity: true
state: "present"
delegate_to: localhost
- name: Remove a vSphere tag-based storage policy
community.vmware.vmware_vm_storage_policy:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
name: "vSphere storage policy"
state: "absent"
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Dustin Scott (@scottd018)