Skip to content

Commit 00cadff

Browse files
DanPartellyDan Partelly
andauthored
Change formatting of JSON output to make it (ipspace#3100)
friendly to Unix tooling (cat, grep ...). Co-authored-by: Dan Partelly <d.partelly@yahoo.com>
1 parent acedf26 commit 00cadff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netsim/outputs/ansible.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def write_inventory_file(data: Box, fname: str, header: str, filetype: typing.Op
137137
if filetype in ['yaml','yml']:
138138
contents = header+"\n"+strings.get_yaml_string(data)
139139
else:
140-
contents = data.to_json()
140+
contents = data.to_json(indent=2)
141141
_files.create_file_from_text(fname,contents)
142142

143143
min_inventory_data = [ 'id','ansible_host','ansible_port','ansible_connection','ansible_user','ansible_ssh_pass' ]

0 commit comments

Comments
 (0)