繁体   English   中英

想从 ping 模块输出中隐藏“ansible_facts”:{“discovered_interpreter_python”:“/usr/bin/python3”}?

[英]want to hide "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3" } from ping module output?

我想从 ping 模块的输出中隐藏"ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3"}

可以配置DEFAULT_STDOUT_CALLBACK" Set the main callback used to display Ansible output." . 例如

$ cat playbook.yml
- hosts: test_01
  tasks:
    - ping:

$ export ANSIBLE_STDOUT_CALLBACK=actionable; ansible-playbook playbook.yml
PLAY [test_01] ***

PLAY RECAP ***
test_01: ok=2  changed=0  unreachable=0  failed=0  skipped=0  rescued=0  ignored=0

查看其他可用的回调插件

只需将以下内容添加到 ansible.cfg:

interpreter_python = /usr/bin/python

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM