mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
nova.py: indented and sorted JSON output
This commit is contained in:
parent
6fdf77f9fe
commit
26cc0b3780
1 changed files with 2 additions and 2 deletions
|
@ -199,7 +199,7 @@ if len(sys.argv) == 2 and (sys.argv[1] == '--list'):
|
|||
continue
|
||||
|
||||
# Return server list
|
||||
print json.dumps(groups)
|
||||
print(json.dumps(groups, sort_keys=True, indent=2))
|
||||
sys.exit(0)
|
||||
|
||||
#####################################################
|
||||
|
@ -228,7 +228,7 @@ elif len(sys.argv) == 3 and (sys.argv[1] == '--host'):
|
|||
if key != 'os_manager':
|
||||
results[key] = value
|
||||
|
||||
print json.dumps(results)
|
||||
print(json.dumps(results, sort_keys=True, indent=2))
|
||||
sys.exit(0)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue