# EOF in backquote substitution

**URL:** <https://forum.ansible.com/t/eof-in-backquote-substitution/13102>\
**Category:** Ansible Project\
**Created:** [July 11, 2013, 4:17pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102 "2013-07-11T16:17:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Hassinger](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@Paul\_Hassinger](https://forum.ansible.com/u/Paul_Hassinger)\
**Post date:** [July 11, 2013, 4:17pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/1 "2013-07-11T16:17:29Z")

</div>

I am receiving the following with verbose debugging:

\<[myserver.mydomain.com](http://myserver.mydomain.com)\> ESTABLISH CONNECTION FOR USER: cq  
\<[myserver.mydomain.com](http://myserver.mydomain.com)\> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=cq’, ‘-o’, ‘ConnectTimeout=10’, ‘[myserver.mydomain.com](http://myserver.mydomain.com)’, “/bin/sh -c ‘mkdir -p /home/ipauldev/.ansible/tmp/ansible-1373558723.98-238619182609175 && chmod a+rx /home/ipauldev/.ansible/tmp/ansible-1373558723.98-238619182609175 && echo /home/ipauldev/.ansible/tmp/ansible-1373558723.98-238619182609175’”]  
\<[myserver.mydomain.com](http://myserver.mydomain.com)\> REMOTE\_MODULE setup CHECKMODE=True  
\<[myserver.mydomain.com](http://myserver.mydomain.com)\> PUT /tmp/tmp90a9wE TO mkdir: cannot create directory `/home/ipauldev': Permission denied/setup <myserver.mydomain.com> EXEC ['ssh', '-tt', '-q', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/tmp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PasswordAuthentication=no', '-o', 'User=cq', '-o', 'ConnectTimeout=10', 'myserver.mydomain.com', '/bin/sh -c \'/usr/bin/python mkdir: cannot create directory `/home/ipauldev'“'”': Permission denied/setup'']

failed: [[myserver.mydomain.com](http://myserver.mydomain.com)] =\> {“failed”: true, “parsed”: false}  
invalid output was: /bin/sh: 1: Syntax error: EOF in backquote substitution

I did update to the latest source from github… not sure if that, or something else on my end changed… I see it’s looking at permission denied issues as well.

Looking for any ideas/assistance.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Paul\_Hassinger](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@Paul\_Hassinger](https://forum.ansible.com/u/Paul_Hassinger)\
**Post date:** [July 11, 2013, 4:25pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/2 "2013-07-11T16:25:22Z")

</div>

It looks like this commit causes this issue:

[https://github.com/ansible/ansible/commit/e5ff35bbdb84b70e7bfa13398b296f15089aaa48](https://github.com/ansible/ansible/commit/e5ff35bbdb84b70e7bfa13398b296f15089aaa48)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 11, 2013, 8:47pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/3 "2013-07-11T20:47:29Z")

</div>

Please don’t comment on commits but rather file bugs instead, comments on commits are just going to be lost in the shuffle.

Can you share the command you ran in the playbook that caused this problem?

Thanks!

---

<div class="post-metadata">

**Author:** ![Andreas\_Piesk](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Andreas\_Piesk](https://forum.ansible.com/u/Andreas_Piesk)\
**Post date:** [July 11, 2013, 9:08pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/4 "2013-07-11T21:08:23Z")

</div>

i think, the commit itself isn't the problem but it reveals a bug, IMHO.  
as far as i understand it remote\_tmp is supposed to be expanded by the shell on the remote side.  
that means, remote\_tmp shouldn't be expanded at all by ansible because without the commit a path like '~/.ansible/tmp' would lead to the same issue too.

-ap

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 11, 2013, 9:28pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/5 "2013-07-11T21:28:17Z")

</div>

I’ve reverted this one, thanks!

Basically we need a param on shell\_expand\_path and should not call it on the remote temp parameter

If you can make this change we can add in expansion on other parameters back in.

Thanks!

---

<div class="post-metadata">

**Author:** ![Paul\_Hassinger](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@Paul\_Hassinger](https://forum.ansible.com/u/Paul_Hassinger)\
**Post date:** [July 11, 2013, 11:15pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/6 "2013-07-11T23:15:53Z")

</div>

OK, thanks. I will not comment on the commits in the future, thank you.

The issue failed on gathering facts, no specific command in the playbook. (I tried removing a couple of tasks, it just always fails for me)

Would you still like me to file a bug? or are we good since you reverted the commit? I assume AlphaPapa101 will handle that…

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 11, 2013, 11:38pm UTC](https://forum.ansible.com/t/eof-in-backquote-substitution/13102/7 "2013-07-11T23:38:19Z")

</div>

I think we are ok because we reverted it, but a pull request to fix up the others from A.P. would be great!
