community / community.vmware / 0.4.0 / module / vmware_folder_info Provides information about folders in a datacenter Authors: David Hewitt (@davidmhewitt) preview | supported by communitycommunity.vmware.vmware_folder_info (0.4.0) — module
Install with ansible-galaxy collection install community.vmware:==0.4.0
collections: - name: community.vmware version: 0.4.0
The module can be used to gather a hierarchical view of the folders that exist within a datacenter
- name: Provide information about vCenter folders vmware_folder_info: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' datacenter: datacenter_name delegate_to: localhost register: vcenter_folder_info
port: default: 443 description: - The port number of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable C(VMWARE_PORT) will be used instead. - Environment variable support added in Ansible 2.6. type: int hostname: description: - 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 C(VMWARE_HOST) will be used instead. - Environment variable support added in Ansible 2.6. type: str password: aliases: - pass - pwd description: - The password of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable C(VMWARE_PASSWORD) will be used instead. - Environment variable support added in Ansible 2.6. type: str username: aliases: - admin - user description: - The username of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable C(VMWARE_USER) will be used instead. - Environment variable support added in Ansible 2.6. type: str datacenter: aliases: - datacenter_name description: - Name of the datacenter. required: true type: str proxy_host: description: - Address of a proxy that will receive all HTTPS requests and relay them. - The format is a hostname or a IP. - If the value is not specified in the task, the value of environment variable C(VMWARE_PROXY_HOST) will be used instead. - This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 required: false type: str proxy_port: description: - Port of the HTTP proxy that will receive all HTTPS requests and relay them. - If the value is not specified in the task, the value of environment variable C(VMWARE_PROXY_PORT) will be used instead. required: false type: int validate_certs: default: true description: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. - If the value is not specified in the task, the value of environment variable C(VMWARE_VALIDATE_CERTS) will be used instead. - Environment variable support added in Ansible 2.6. - If set to C(yes), please make sure Python >= 2.7.9 is installed on the given machine. type: bool
folder_info: description: - dict about folders returned: success sample: datastoreFolders: path: /DC01/datastore subfolders: Local Datastores: path: /DC01/datastore/Local Datastores subfolders: {} hostFolders: path: /DC01/host subfolders: {} networkFolders: path: /DC01/network subfolders: {} vmFolders: path: /DC01/vm subfolders: Core Infrastructure Servers: path: /DC01/vm/Core Infrastructure Servers subfolders: Staging Network Services: path: /DC01/vm/Core Infrastructure Servers/Staging Network Services subfolders: {} VMware: path: /DC01/vm/Core Infrastructure Servers/VMware subfolders: {} type: str