Parameter | Choices/Defaults | Comments |
---|---|---|
datacenter_name | Name of the datacenter to add the datastore. The datacenter isn't used by the API to create a datastore. | |
datastore_name - / required | ||
datastore_type - / required |
| Type of the datastore to configure (nfs/nfs41/vmfs). |
esxi_hostname | ESXi hostname to manage the datastore. | |
hostname | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.Environment variable support added in Ansible 2.6. | |
nfs_path | Resource path on NFS host. Required if datastore type is set to nfs /nfs41 and state is set to present , else unused. | |
nfs_ro |
| Unused if datastore type is not set to nfs /nfs41 and state is not set to present . |
nfs_server | NFS host serving nfs datastore. Required if datastore type is set to nfs /nfs41 and state is set to present , else unused.Two or more servers can be defined if datastore type is set to nfs41 | |
password | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.Environment variable support added in Ansible 2.6. | |
port integer | Default: 443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.Environment variable support added in Ansible 2.6. |
state |
| present: Mount datastore on host if datastore is absent else do nothing. absent: Umount datastore if datastore is present else do nothing. |
username | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.Environment variable support added in Ansible 2.6. | |
validate_certs boolean |
| Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.Environment variable support added in Ansible 2.6. If set to yes , please make sure Python >= 2.7.9 is installed on the given machine. |
vmfs_device_name | Name of the device to be used as VMFS datastore. Required for VMFS datastore type and state is set to present , else unused. | |
vmfs_version | VMFS version to use for datastore creation. Unused if datastore type is not set to vmfs and state is not set to present . |
Jan 13, 2018 Creating NFS DataStore: Here ESX host make connectivity using standard TCP network protocol to NFS device(NAS device), NFS device owns and operates file system. NFS device share folder(NFS file system) to EXS host and ESX host creates NFS datastore on that folder means storage and file system is in control of NFS device.