# No color when running ansible SSH as an argument

**URL:** <https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506>\
**Category:** Ansible Project\
**Created:** [October 14, 2014, 5:55pm UTC](https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506 "2014-10-14T17:55:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Burton](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kevin\_Burton](https://forum.ansible.com/u/Kevin_Burton)\
**Post date:** [October 14, 2014, 5:55pm UTC](https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506/1 "2014-10-14T17:55:05Z")

</div>

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](mailto: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?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [October 14, 2014, 5:57pm UTC](https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506/2 "2014-10-14T17:57:07Z")

</div>

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

See [http://docs.ansible.com/intro\_configuration.html#force-color](http://docs.ansible.com/intro_configuration.html#force-color)

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.ansible.com/u/adam2)\
**Post date:** [October 14, 2014, 5:58pm UTC](https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506/3 "2014-10-14T17:58:53Z")

</div>

Use "ssh -t"

---

<div class="post-metadata">

**Author:** ![Kevin\_Burton](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kevin\_Burton](https://forum.ansible.com/u/Kevin_Burton)\
**Post date:** [October 14, 2014, 6:26pm UTC](https://forum.ansible.com/t/no-color-when-running-ansible-ssh-as-an-argument/16506/4 "2014-10-14T18:26:15Z")

</div>

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! 😛

Thanks for the help!
