Skip to content

Commit

Permalink
Ommit group when OS id is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xezpeleta committed May 10, 2021
1 parent 2b4f351 commit d7b0139
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions proxmox.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,12 @@ def main_list(options, config_path):

if 'proxmox_os_id' in results['_meta']['hostvars'][vm]:
osid = results['_meta']['hostvars'][vm]['proxmox_os_id']
if osid not in results:
results[osid] = {
'hosts': []
}
results[osid]['hosts'] += [vm]
if osid:
if osid not in results:
results[osid] = {
'hosts': []
}
results[osid]['hosts'] += [vm]

results['_meta']['hostvars'][vm].update(metadata)

Expand Down

0 comments on commit d7b0139

Please sign in to comment.