mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
During vsphere config check attempt cast before marking values missing
Fixes #7385
This commit is contained in:
parent
7faecd54b0
commit
67d8df0e32
1 changed files with 9 additions and 1 deletions
|
@ -974,7 +974,15 @@ class DefaultVMConfig(object):
|
||||||
for k, v in value.items():
|
for k, v in value.items():
|
||||||
if k in self.check_dict[key]:
|
if k in self.check_dict[key]:
|
||||||
if not isinstance(self.check_dict[key][k], v):
|
if not isinstance(self.check_dict[key][k], v):
|
||||||
self.recursive_missing.append((k, v))
|
try:
|
||||||
|
if v == int:
|
||||||
|
self.check_dict[key][k] = int(self.check_dict[key][k])
|
||||||
|
elif v == basestring:
|
||||||
|
self.check_dict[key][k] = str(self.check_dict[key][k])
|
||||||
|
else:
|
||||||
|
raise ValueError
|
||||||
|
except ValueError:
|
||||||
|
self.recursive_missing.append((k, v))
|
||||||
else:
|
else:
|
||||||
self.recursive_missing.append((k, v))
|
self.recursive_missing.append((k, v))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue