Commit d7621af1 authored by Sigmund Augdal's avatar Sigmund Augdal

Sort hostgroups and hosts in check-kind output

parent 37c3bf16
......@@ -191,9 +191,9 @@ def check_kind(args):
if status == 'OK' and not args.include_ok:
continue
print("Kind status: {status}".format(status=status))
for group, hosts in groups.items():
for group, hosts in sorted(groups.items(), key=lambda x: x[0]):
print(" * {group}".format(group=group))
for host in hosts:
for host in sorted(hosts):
print(" - {host}".format(host=host))
else:
for status, hosts in statuses.items():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment