标签: colors ansible
关于https://docs.ansible.com/ansible/latest/modules/debug_module.html,没有提到如何控制文本的前景色和背景色。有可能控制吗?
答案 0 :(得分:2)
可以在配置文件和/或环境变量中configure种颜色。
例如debug
> cat ansible.cfg [defaults] inventory = $PWD/hosts ... [colors] debug = red deprecate = bright purple changed = purple
或
> set | grep ANSIBLE_COLOR_DEBUG ANSIBLE_COLOR_DEBUG=red