问题原文
原帖链接 · mjallday · CC BY-SA 3.0
I have a Ansible play for PGBouncer that displays some output from a stats module built into PGBouncer.
My issue is that when Ansible prints the output to the terminal it mangles the newlines. Instead of seeing
----------
| OUTPUT |
----------
I see
----------\n| OUTPUT |\n----------
Does anyone know how to get Ansible to "pretty print" the output?
社区高分解答
原帖链接 · sorin · CC BY-SA 4.0
If you want more human friendly output define:
ANSIBLE_STDOUT_CALLBACK=debug
This will make ansible use the debug output module (previously named human_log) which despite its unfortunate name is less verbose and much easier to read by humans.
If you get an error that this module is not available, upgrade Ansible or add this module locally if you cannot upgrade ansible, it will work with over versions of ansible like 2.0 or probably even 1.9.
Another option to configure this is to add stdout_callback = debug to your ansible.cfg
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
