cobbler inventory list systems without mgmt_classes as ungrouped
This commit is contained in:
parent
b7f229d390
commit
51ef343e60
1 changed files with 4 additions and 0 deletions
|
@ -96,6 +96,10 @@ if len(sys.argv) == 2 and (sys.argv[1] == '--list'):
|
||||||
# first DNS name but no further DNS names
|
# first DNS name but no further DNS names
|
||||||
groups[cls].append(dns_name)
|
groups[cls].append(dns_name)
|
||||||
|
|
||||||
|
# handle hosts without mgmt_classes
|
||||||
|
if not classes:
|
||||||
|
groups['ungrouped'].append(dns_name)
|
||||||
|
|
||||||
print json.dumps(groups)
|
print json.dumps(groups)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue