Compare commits

...

3 Commits

Author SHA1 Message Date
Xabi bd1f2b1dbc
Update CHANGELOG.md 2021-09-07 20:59:56 +02:00
Xabi 4f06c2bd9e
Merge pull request #39 from maynero/master
Check if "template" key exists in Proxmox API result
2021-09-07 20:53:49 +02:00
maynero 83005f4ab6 Check if template key exists in api result 2021-07-24 08:41:46 +08:00
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## v1.0.2
- Proxmox v7 compatibility check if template key exists (by @maynero) [#39](https://github.com/xezpeleta/Ansible-Proxmox-inventory/pull/39)
## v1.0.1
- Ommit group when OS id is empty (d7b0139)
## v1.0.0
- Added option to ignore invalid SSL certificate (by @bmillemathias) [PR](https://github.com/ansible/ansible/pull/17247)
- Compatible with a Proxmox cluster (by @xezpeleta)

View File

@ -65,7 +65,7 @@ class ProxmoxVMList(list):
def get_names(self):
if self.ver >= 4.0:
return [vm['name'] for vm in self if vm['template'] != 1]
return [vm['name'] for vm in self if 'template' in vm and vm['template'] != 1]
else:
return [vm['name'] for vm in self]