No color when running ansible SSH as an argument

If I ssh into a box , interactively, then run ansible, I get color, without any issue.

However, if I run it as a batch command, like:

ssh release@myserver.com "ansible-playbook … "

Then it doesn’t have color.

The TERM is setup correctly and the same as when I run ssh interactively.

Any advice?

You can force ansible to display colors by using force_color in ansible.cfg.

See http://docs.ansible.com/intro_configuration.html#force-color

Use "ssh -t"

Ha. yup. Realized that as I was posting the email… did I didn’t try forcing the pseudo terminal :

… so basically I get to be that guy who pretty much answers his own question! :stuck_out_tongue:

Thanks for the help!