When I run an ansible (v2.9.9) ad-hoc command, the output is colourized. Green for successful resuilts etc. I am building up a bash pipeline, so how can I tell ansible to not colourize the output?
Asked
Active
Viewed 2,570 times
4
-
What do you mean by building up a pipeline? By default ansible does not colour is output when it is piped to another command. – Michał Politowski Jul 15 '20 at 08:47
1 Answers
5
Configure ANSIBLE_NOCOLOR. For example
shell> ANSIBLE_NOCOLOR=True ansible localhost -a "date"
localhost | CHANGED | rc=0 >>
Wed 15 Jul 2020 10:03:04 AM CEST

Vladimir Botka
- 5,138
- 8
- 20