# Shell module

**URL:** <https://forum.ansible.com/t/shell-module/11348>\
**Category:** Ansible Project\
**Created:** [March 15, 2012, 12:42am UTC](https://forum.ansible.com/t/shell-module/11348 "2012-03-15T00:42:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 15, 2012, 12:42am UTC](https://forum.ansible.com/t/shell-module/11348/1 "2012-03-15T00:42:11Z")

</div>

Found a quick way to do the shell module that Seth was playing with, with out duplicating any module code.

With the latest source, try this:

ansible all -m shell -a “/bin/echo $ROOT”

Shell is not really a different module named command, but is the result of some magic in the code to make  
it run the command module with some extra options behind the scenes.

Documentation pending but it works exactly the same, because it IS the same module. Output is also tailored  
like the command module.

(The default for “-m” is still “command”. Maybe it should be shell? Yes? No?)

–Michael
