Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify a child resource pool in vmware_guest #1360

Open
matletix opened this issue Jun 21, 2022 · 0 comments · May be fixed by #1789
Open

Specify a child resource pool in vmware_guest #1360

matletix opened this issue Jun 21, 2022 · 0 comments · May be fixed by #1789

Comments

@matletix
Copy link
Contributor

matletix commented Jun 21, 2022

SUMMARY

When creating a VM with the vmware_guest module, it's possible to specify a cluster and a resource pool.
In my case, I have a cluster with resource pools and child resource pools. Example: two resource pools RP1 and RP2 with each a child resource pool SubRP:

cluster
├── RP1
│   └── SubRP
└── RP2
    └── SubRP

I need to create a VM in the RP2 / SubRP resource pool. However I can only specify the resource_pool: SubRP parameter (which will select either RP1 / SubRP or RP2 / SubRP as the module will take the first resource that it finds with the matching name).
It would be useful to be able to specify a path in the resource_pool parameter to select a child resource pool. E.g.

---
- name: Create a VM
  vmware_guest:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    datacenter: "{{ vcenter_datacenter }}"
    cluster: "cluster"
    resource_pool: "/RP1/SubRP"
    ...
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

vmware_guest

IlyaTsoi added a commit to IlyaTsoi/community.vmware that referenced this issue Jul 6, 2023
I propose to change the logic of defining the target resource pool. In the current logic, nested resource pools cannot be defined, and the virtual machine is deployed in the first pool found by name, nesting is not considered. Issue ansible-collections#1360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant