Fix trailing space added at end of line in converted inventory
Change-Id: Id2513a99fb37c3f82c1815a444e87622ab18de8a Closes-Bug: #1657951
This commit is contained in:
parent
d8847875e8
commit
8df22c4644
@ -191,6 +191,7 @@ def write_hostnames(save_path, hostnames_ips):
|
||||
json.dumps(
|
||||
hostnames_ips,
|
||||
indent=4,
|
||||
separators=(',', ': '),
|
||||
sort_keys=True
|
||||
)
|
||||
)
|
||||
|
@ -1074,6 +1074,7 @@ def main(config=None, check=False, debug=False, environment=None, **kwargs):
|
||||
inventory_json = json.dumps(
|
||||
inventory,
|
||||
indent=4,
|
||||
separators=(',', ': '),
|
||||
sort_keys=True
|
||||
)
|
||||
|
||||
|
@ -324,12 +324,14 @@ def main():
|
||||
print(json.dumps(export_host_info(inventory), indent=2))
|
||||
elif user_args['clear_ips'] is True:
|
||||
remove_ip_addresses(inventory)
|
||||
inventory_json = json.dumps(inventory, indent=2)
|
||||
inventory_json = json.dumps(inventory, indent=2,
|
||||
separators=(',', ': '))
|
||||
filesys.save_inventory(inventory_json, filename)
|
||||
print('Success. . .')
|
||||
else:
|
||||
du.recursive_dict_removal(inventory, user_args['remove_item'])
|
||||
inventory_json = json.dumps(inventory, indent=2)
|
||||
inventory_json = json.dumps(inventory, indent=2,
|
||||
seprators=(',', ': '))
|
||||
filesys.save_inventory(inventory_json, filename)
|
||||
print('Success. . .')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user