Is there a way to get the vmware_guest module to not deploy a build from template into a resource pool? Our vcenter has a cluster with 4 esx hosts in, there is one resource pool that is setup for SRM, theres nothing in it and i’m not entirely sure why its there. All our VMs get put straight into the cluster not assigned to any resource pools but when I build with ansible from a template it will always place the new vm in that resource pool
I’ve tried a few different ways to set the ‘resource_pool:’ option to fix this but haven’t found anything that works yet
Thanks
Hello,
What is your version of Ansible ?
Starting version 2.4, vmware_guest is totally broken on the resource_pool parameter.
For previous versions, the default resource pool ithat could be indicated was /Resources and it was working.
(It has been introduced in 2.3)
To be honest, for the moment, you should use vsphere_guest.
Even if it old and “soon” to be depreciated (aka when vmware_guest will be working properly), it’s much more stable for the moment than vmware_guest and still have more functions.
Hello,
I’m currently using 2.4.2 (inside Ansible AWX).
I’ve tried both using vSphere and VMware modules. But you mentioned VMware is screwed with resource_pool so I will make sure to switch that back. with these modules there are a lot of threads showing how to chose a specific resource pool but no way of telling it to not put it in a resource pool
For future reference:
Found someone else had the exact same issue of sometimes having one pool present that he didn’t want the new vm to be placed into:
https://github.com/ansible/ansible/issues/28394
Was fixed with the option to have
resource_pool_cluster_root: True
This is only in the newer more functional vmware_guest module. and Ansible 2.5.0+ for it to be available