У меня есть такой консольный выхлоп:
ok: [km1] => {
"msg": "{ 'msg': u'All items completed', 'changed': True, 'results': [{'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.298216', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/logging_module ; git checkout /home/user/work/gitRepos/logging_module', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/logging_module.git', u'master', u'/home/user/work/gitRepos/logging_module'], u'delta': u'0:00:00.004221', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/logging_module ; git checkout /home/user/work/gitRepos/logging_module', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.293995', u'warnings': []}, {'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.464896', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/iks ; git checkout /home/user/work/gitRepos/iks', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/iks.git', u'loaderForBaseModules', u'/home/user/work/gitRepos/iks'], u'delta': u'0:00:00.004814', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/iks ; git checkout /home/user/work/gitRepos/iks', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.460082', u'warnings': []}, {'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.637842', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/idk2 ; git checkout /home/user/work/gitRepos/idk2', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/idk2.git', u'loaderForBaseModules', u'/home/user/work/gitRepos/idk2'], u'delta': u'0:00:00.004030', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/idk2 ; git checkout /home/user/work/gitRepos/idk2', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.633812', u'warnings': []}]}\n{'msg': u'All items completed', 'changed': True, 'results': [{'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.298216', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/logging_module ; git checkout /home/user/work/gitRepos/logging_module', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/logging_module.git', u'master', u'/home/user/work/gitRepos/logging_module'], u'delta': u'0:00:00.004221', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/logging_module ; git checkout /home/user/work/gitRepos/logging_module', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.293995', u'warnings': []}, {'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.464896', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/iks ; git checkout /home/user/work/gitRepos/iks', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/iks.git', u'loaderForBaseModules', u'/home/user/work/gitRepos/iks'], u'delta': u'0:00:00.004814', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/iks ; git checkout /home/user/work/gitRepos/iks', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.460082', u'warnings': []}, {'_ansible_parsed': True, '_ansible_item_result': True, u'end': u'2019-11-29 09:15:26.637842', '_ansible_no_log': False, u'stdout': u'', u'cmd': u'cd /home/user/work/gitRepos/idk2 ; git checkout /home/user/work/gitRepos/idk2', u'changed': True, 'item': [u'vasya@192.168.1.10:/home/git/idk2.git', u'loaderForBaseModules', u'/home/user/work/gitRepos/idk2'], u'delta': u'0:00:00.004030', u'stderr': u'', u'rc': 0, 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': True, u'_raw_params': u'cd /home/user/work/gitRepos/idk2 ; git checkout /home/user/work/gitRepos/idk2', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], u'start': u'2019-11-29 09:15:26.633812', u'warnings': []}]}"
}
Это выхлоп Ansible, вроде как это питоновский массив. Мне нужно его посмотреть в виде форматированной структуры, чтобы один параметр в одну строку и с правильными отступами.
Как это сделать?
- Локально на машине
- Через какой-нибудь online-beautifier
?