# ansible doesn't support commands containing special letters

**URL:** <https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881>\
**Category:** Ansible Project\
**Created:** [August 7, 2014, 12:38am UTC](https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881 "2014-08-07T00:38:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user29](https://avatars.discourse-cdn.com/v4/letter/u/2acd7d/32.png) [@user29](https://forum.ansible.com/u/user29)\
**Post date:** [August 7, 2014, 12:38am UTC](https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881/1 "2014-08-07T00:38:16Z")

</div>

such as “ls && cd …” and " if [! -d “/myfolder”]". so some command can be run at the terminal but not in ansible, sometimes we have to write a script file to enable the command.  
Personally thinking, I think this feature could be improved.

---

<div class="post-metadata">

**Author:** ![Greg\_Andrews](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@Greg\_Andrews](https://forum.ansible.com/u/Greg_Andrews)\
**Post date:** [August 7, 2014, 12:46am UTC](https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881/2 "2014-08-07T00:46:30Z")

</div>

Have you tried the shell module instead of the command module?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [August 7, 2014, 2:10pm UTC](https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881/3 "2014-08-07T14:10:50Z")

</div>

Command module does not support pipes, use shell module

Brian Coca

---

<div class="post-metadata">

**Author:** ![user29](https://avatars.discourse-cdn.com/v4/letter/u/2acd7d/32.png) [@user29](https://forum.ansible.com/u/user29)\
**Post date:** [August 7, 2014, 5:36pm UTC](https://forum.ansible.com/t/ansible-doesnt-support-commands-containing-special-letters/15881/4 "2014-08-07T17:36:57Z")

</div>

Thank you. Even I use shell in my cookbook, I only try to change the line with command.

dI should be more careful.
