VMware: Fix cluster argument of module vmware_content_deploy_template (#65715)

This commit is contained in:
gp 2019-12-14 10:13:35 -05:00 committed by Abhijeet Kasurde
parent 885cecfc94
commit 98f19c970f
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "`vmware_content_deploy_template`'s `cluster` argument no longer fails with an error message about resource pools."

View file

@ -190,7 +190,7 @@ class VmwareContentDeployTemplate(VmwareRestClient):
# Find the Cluster by the given Cluster name
self.cluster_id = None
if self.cluster:
self.cluster_id = self.get_resource_pool_by_name(self.datacenter, self.resourcepool)
self.cluster_id = self.get_cluster_by_name(self.datacenter, self.cluster)
if not self.cluster_id:
self.module.fail_json(msg="Failed to find the Cluster %s" % self.cluster)
# Create VM placement specs