Ansible - Display message color

1,791 views
Skip to first unread message

Karther

unread,
Dec 24, 2019, 3:44:21 AM12/24/19
to Ansible Project
Hey !!!

I want to know if possible display message with module debug: msg="my first message an color red"

I don't know if there is argument color: red or other argument for specify only one task message is an color ....


Can you help me please ???! 

Thank you very much community Ansible !!! =)

Best Regards,

Karther

Vladimir Botka

unread,
Dec 24, 2019, 11:44:29 AM12/24/19
to Karther, ansible...@googlegroups.com
On Tue, 24 Dec 2019 00:44:21 -0800 (PST)
Karther <ryadmo...@gmail.com> wrote:

> I want to know if possible display message with module *debug: msg="my
> first message an color red"*

Yes. It's possible. Set "ok = red" in ansible.cfg or export
"ANSIBLE_COLOR_OK=red". See "COLOR_OK"
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#color-ok

> I don't know if there is argument color: red or other argument for specify
> only one task message is an color ....

No. There is no such argument. It's not possible to specify a color for one
task only. See "Callback Plugins"
https://docs.ansible.com/ansible/latest/plugins/callback.html#callback-plugins
https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/callback

Cheers,

-vlado
Reply all
Reply to author
Forward
0 new messages