You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
is there already a possibility to beautify the output from the playbooks ?
at the moment you have to use -v switch to get any output and that output is hard to read.
like this: https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
changed: [192.168.100.31] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "msg": "{u'Status': u'Success', u'CLI Command executed': u'show network\n', u'IAP IP address': u'192.168.100.31', u'Command output': u'cli output: \n\nCOMMAND=show network\n\r\nNetworks\n--------\nProfile Name ESSID Clients Type Band Authentication Method Key Management IP Assignment Status Zone Coding Active Max IPv4 Users\n------------ ----- ------- ---- ---- --------------------- -------------- ------------- ------ ---- ------ ------ --------------\nSetMeUp SetMeUp-C0:AE:C3 0 employee 2.4 None none NAT Mode Enabled - Default Yes N/A', u'Status-code': 0}", "status_code": 200}
I agree with @mac0815, the output is less then desirable...
While @nikunj1210's suggestion works, I don't like that it drops all the ansible color\formatting.
I found that registering the task output and writing it to a file with {{ foobar.response | string }} work well. It looks like you would expect. I was even able to get a easy to read diff of the changes using this method
Hi
is there already a possibility to beautify the output from the playbooks ?
at the moment you have to use -v switch to get any output and that output is hard to read.
like this:
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
changed: [192.168.100.31] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "msg": "{u'Status': u'Success', u'CLI Command executed': u'show network\n', u'IAP IP address': u'192.168.100.31', u'Command output': u'cli output: \n\nCOMMAND=show network\n\r\nNetworks\n--------\nProfile Name ESSID Clients Type Band Authentication Method Key Management IP Assignment Status Zone Coding Active Max IPv4 Users\n------------ ----- ------- ---- ---- --------------------- -------------- ------------- ------ ---- ------ ------ --------------\nSetMeUp SetMeUp-C0:AE:C3 0 employee 2.4 None none NAT Mode Enabled - Default Yes N/A', u'Status-code': 0}", "status_code": 200}
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
192.168.100.31 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
can i somehow "debug: var=output.stdout_lines" the output ?
Regards Markus
The text was updated successfully, but these errors were encountered: