# Executing shell script on remote machine not working

**URL:** <https://forum.ansible.com/t/executing-shell-script-on-remote-machine-not-working/15108>\
**Category:** Ansible Developer\
**Tags:** ansible-devel\
**Created:** [April 29, 2014, 1:41am UTC](https://forum.ansible.com/t/executing-shell-script-on-remote-machine-not-working/15108 "2014-04-29T01:41:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Church1](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@Chris\_Church1](https://forum.ansible.com/u/Chris_Church1)\
**Post date:** [April 29, 2014, 1:41am UTC](https://forum.ansible.com/t/executing-shell-script-on-remote-machine-not-working/15108/1 "2014-04-29T01:41:02Z")

</div>

>

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [April 29, 2014, 12:50pm UTC](https://forum.ansible.com/t/executing-shell-script-on-remote-machine-not-working/15108/2 "2014-04-29T12:50:16Z")

</div>

Exactly the case.

Also, if you want to use any shell keywords, you’ll also want to switch to “shell: /usr/bin/foo” because “command” does not run through the shell.

For instance, “&&” would not have worked without the shell.
