• AnsibleFest
  • Products
  • Community
  • Webinars & Training
  • Blog
Ansible Logo
Documentation
Ansible
5

Installation, Upgrade & Configuration

  • Installation Guide
  • Ansible Porting Guides

Using Ansible

  • User Guide

Contributing to Ansible

  • Ansible Community Guide

Extending Ansible

  • Developer Guide

Common Ansible Scenarios

  • Legacy Public Cloud Guides
  • Network Technology Guides
  • Virtualization and Containerization Guides

Network Automation

  • Network Getting Started
  • Network Advanced Topics
  • Network Developer Guide

Ansible Galaxy

  • Galaxy User Guide
  • Galaxy Developer Guide

Reference & Appendices

  • Collection Index
    • Collections in the Amazon Namespace
    • Collections in the Ansible Namespace
    • Collections in the Arista Namespace
    • Collections in the Awx Namespace
    • Collections in the Azure Namespace
    • Collections in the Check_point Namespace
    • Collections in the Chocolatey Namespace
    • Collections in the Cisco Namespace
    • Collections in the Cloud Namespace
    • Collections in the Cloudscale_ch Namespace
    • Collections in the Community Namespace
    • Collections in the Containers Namespace
    • Collections in the Cyberark Namespace
    • Collections in the Dellemc Namespace
    • Collections in the F5networks Namespace
    • Collections in the Fortinet Namespace
    • Collections in the Frr Namespace
    • Collections in the Gluster Namespace
    • Collections in the Google Namespace
    • Collections in the Hetzner Namespace
    • Collections in the Hpe Namespace
    • Collections in the Ibm Namespace
    • Collections in the Infinidat Namespace
    • Collections in the Infoblox Namespace
    • Collections in the Inspur Namespace
    • Collections in the Junipernetworks Namespace
    • Collections in the Kubernetes Namespace
    • Collections in the Mellanox Namespace
    • Collections in the Netapp Namespace
    • Collections in the Netapp_eseries Namespace
    • Collections in the Netbox Namespace
    • Collections in the Ngine_io Namespace
    • Collections in the Openstack Namespace
    • Collections in the Openvswitch Namespace
    • Collections in the Ovirt Namespace
    • Collections in the Purestorage Namespace
    • Collections in the Sensu Namespace
    • Collections in the Servicenow Namespace
    • Collections in the Splunk Namespace
    • Collections in the T_systems_mms Namespace
    • Collections in the Theforeman Namespace
    • Collections in the Vmware Namespace
      • Vmware.Vmware_Rest
        • Description
        • Scenario Guide
        • Developer Guide
        • Plugin Index
    • Collections in the Vyos Namespace
    • Collections in the Wti Namespace
  • Indexes of all modules and plugins
  • Playbook Keywords
  • Return Values
  • Ansible Configuration Settings
  • Controlling how Ansible behaves: precedence rules
  • YAML Syntax
  • Python 3 Support
  • Interpreter Discovery
  • Releases and maintenance
  • Testing Strategies
  • Sanity Tests
  • Frequently Asked Questions
  • Glossary
  • Ansible Reference: Module Utilities
  • Special Variables
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • Logging Ansible output

Roadmaps

  • Ansible Roadmap




Ansible
  • Collection Index
  • Collections in the Vmware Namespace
  • Vmware.Vmware_Rest
  • vmware.vmware_rest.vcenter_folder_info module – Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the {@link FilterSpec}.


You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.

vmware.vmware_rest.vcenter_folder_info module – Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the {@link FilterSpec}.

Note

This module is part of the vmware.vmware_rest collection (version 2.2.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install vmware.vmware_rest.

To use it in a playbook, specify: vmware.vmware_rest.vcenter_folder_info.

New in version 0.1.0: of vmware.vmware_rest

  • Synopsis

  • Requirements

  • Parameters

  • Notes

  • Examples

  • Return Values

Synopsis

  • Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the {@link FilterSpec}.

Requirements

The below requirements are needed on the host that executes this module.

  • vSphere 7.0.2 or greater

  • python >= 3.6

  • aiohttp

Parameters

Parameter

Comments

datacenters

aliases: filter_datacenters

list / elements=string

Datacenters that must contain the folder for the folder to match the filter.

folders

aliases: filter_folders

list / elements=string

Identifiers of folders that can match the filter.

names

aliases: filter_names

list / elements=string

Names that folders must have to match the filter (see {@link Summary#name}).

parent_folders

list / elements=string

Folders that must contain the folder for the folder to match the filter.

session_timeout

float

added in 2.1.0 of vmware.vmware_rest

Timeout settings for client session.

The maximal number of seconds for the whole operation including connection establishment, request sending and response.

The default value is 300s.

type

aliases: filter_type

string

The type defines the type of a vCenter Server folder. The type of a folder determines what what kinds of children can be contained in the folder.

Choices:

  • DATACENTER

  • DATASTORE

  • HOST

  • NETWORK

  • VIRTUAL_MACHINE

vcenter_hostname

string / required

The hostname or IP address of the vSphere vCenter

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

vcenter_password

string / required

The vSphere vCenter password

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

vcenter_rest_log_file

string

You can use this optional parameter to set the location of a log file.

This file will be used to record the HTTP REST interaction.

The file will be stored on the host that run the module.

If the value is not specified in the task, the value of

environment variable VMWARE_REST_LOG_FILE will be used instead.

vcenter_username

string / required

The vSphere vCenter username

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

vcenter_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.

Choices:

  • no

  • yes ← (default)

Notes

Note

  • Tested on vSphere 7.0.2

Examples

- name: Build a list of all the folders
  vmware.vmware_rest.vcenter_folder_info:
  register: my_folders

- name: Build a list of all the folders with the type VIRTUAL_MACHINE and called vm
  vmware.vmware_rest.vcenter_folder_info:
    filter_type: VIRTUAL_MACHINE
    filter_names:
    - vm
  register: my_folders

- name: Build a list of the folders, with a filter
  vmware.vmware_rest.vcenter_folder_info:
    filter_type: DATASTORE

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

value

list / elements=string

Build a list of all the folders with the type VIRTUAL_MACHINE and called vm

Returned: On success

Sample: [{“folder”: “group-v1136”, “name”: “vm”, “type”: “VIRTUAL_MACHINE”}]

Authors

  • Ansible Cloud Team (@ansible-collections)

Collection links

Issue Tracker Homepage Repository (Sources)

Previous Next

© Copyright Ansible project contributors. Last updated on Nov 07, 2022.