0

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?

1
  • 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 8:47
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.