Merge "Fix trailing space added at end of line in converted inventory"
This commit is contained in:
commit
8aee629271
@ -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