Skip to content

vmware_guest_find / option to stop after first match for saving time #2552

@zenhighzer

Description

@zenhighzer
SUMMARY

Tell vmware_guest_find to stop after the first match

We use guest_find to determine the vms folder and pass the folder to vmware_guest_snapshot for creating and deleting vm snapshots. i know that there can be multiple vms with same "inventory-name" in vmware so it totally makes sense to crawl for all folders. But in our really big environment we only use each inventory-name only once, means that there is only one vm in one folder at the same time. so it would be nice to configure vmware_guest_find to stop after the first match. i.e.: "stop_after_first_match: true". This could help saving time

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

vmware_guest_find

ADDITIONAL INFORMATION
- name: Find Guest's Folder using name
  community.vmware.vmware_guest_find:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    name: myvm
    stop_after_first_match: true
  delegate_to: localhost
  register: vm_folder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions