# A couple errors recently cropped up

**URL:** <https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [June 3, 2014, 1:34pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394 "2014-06-03T13:34:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Ottey](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@Daniel\_Ottey](https://forum.ansible.com/u/Daniel_Ottey)\
**Post date:** [June 3, 2014, 1:34pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/1 "2014-06-03T13:34:55Z")

</div>

A couple errors have recently cropped up when using Ansible, and the latest is causing me to not be able to use it at all. I tried searching for the fatal error(s), but was not able to find anythin mysef, I’m hopeful that this forum can help me out.

My OS is RHEL 6.4 and it also pulls packages from EPEL. My ansible is “ansible 1.5.5” from EPEL.

**Command:**

> ANSIBLE\_SSH\_ARGS=“” ansible-playbook -T 30 -c ssh -s -K -i ~/my\_ansible\_inventory.txt -l [labadmin.lab.boomi.com](http://labadmin.lab.boomi.com) --tags zabbix-agent /etc/ansible/site.yml

The first warning message I have been able to find documented elsewhere, and I think it is not related to the fatal error.

**Warning:**

> /usr/lib64/python2.6/site-packages/pycrypto-2.6.1-py2.6-linux-x86\_64.egg/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz\_powm\_sec. You should rebuild using libgmp \>= 5 to avoid timing attack vulnerability.
> 
> \_warn(“Not using mpz\_powm\_sec. You should rebuild using libgmp \>= 5 to avoid timing attack vulnerability.”, PowmInsecureWarning)
> 
> sudo password:

So I think from what I read elsewhere that I can ignore that warning until the version of libgmp is updated.

**But here is the fatal error:**

> PLAY [apply common configuration to all nodes] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> fatal: [[labadmin.lab.boomi.com](http://labadmin.lab.boomi.com)] =\> Traceback (most recent call last):  
> File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 532, in \_executor  
> exec\_rc = self.\_executor\_internal(host, new\_stdin)  
> File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 564, in \_executor\_internal  
> module\_vars = template.template(self.basedir, self.module\_vars, host\_variables)  
> File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 349, in template  
> d[k] = template(basedir, v, vars, lookup\_fatal, depth, expand\_lists, fail\_on\_undefined=fail\_on\_undefined)  
> File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 331, in template  
> m = \_legacy\_varFind(basedir, varname, vars, lookup\_fatal, depth, expand\_lists)  
> File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 245, in \_legacy\_varFind  
> replacement = instance.run(args, inject=vars)  
> File “/usr/lib/python2.6/site-packages/ansible/runner/lookup\_plugins/pipe.py”, line 35, in run  
> p = subprocess.Popen(term, cwd=self.basedir, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE)  
> File “/usr/lib64/python2.6/subprocess.py”, line 642, in **init**  
> errread, errwrite)  
> File “/usr/lib64/python2.6/subprocess.py”, line 1234, in \_execute\_child  
> raise child\_exception  
> OSError: [Errno 2] No such file or directory
> 
> FATAL: all hosts have already failed – aborting
> 
> PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> to retry, use: --limit @/home/dottey/site.retry
> 
> [labadmin.lab.boomi.com](http://labadmin.lab.boomi.com) : ok=0 changed=0 unreachable=1 failed=0

Any insight into what is causing the fatal error - and if there is anything I can do to resolve it?

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [June 3, 2014, 3:56pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/2 "2014-06-03T15:56:17Z")

</div>

Correct, the warning message can be ignored, and there is a configuration setting (system\_warnings in your ansible.cfg) that can be set to “False” to disable it.

The fatal error appears to be reporting that the executable you’re trying to call via the pipe lookup is not being found at the path specified. Can you share what that is, and validate that the binary is there and executable by the user that the play is running with to make sure there are no security issues?

---

<div class="post-metadata">

**Author:** ![Daniel\_Ottey](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@Daniel\_Ottey](https://forum.ansible.com/u/Daniel_Ottey)\
**Post date:** [June 3, 2014, 4:00pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/3 "2014-06-03T16:00:57Z")

</div>

Thanks for your response. Sorry for not being sure… But you’re saying I’m calling an executable via a pipe lookup … And I have no idea what that means. I’m certainly not doing it intentionally. You ask me to validate “the binary is there” but I don’t know what binary to look for.

Is this happening during the “Gathering Facts” or afterward?

Is the error happening on the local side or the remote side?

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [June 3, 2014, 4:36pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/4 "2014-06-03T16:36:51Z")

</div>

Did you download a role from Galaxy or somewhere else? From the output of the error, it looks like somewhere in your play this appears:

```auto
{{ lookup('pipe','some_executable_name_here') }}

```

So you may want to grep for ‘lookup’ or ‘pipe’ in your files.

---

<div class="post-metadata">

**Author:** ![Daniel\_W\_Ottey](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Daniel\_W\_Ottey](https://forum.ansible.com/u/Daniel_W_Ottey)\
**Post date:** [June 3, 2014, 7:03pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/5 "2014-06-03T19:03:37Z")

</div>

I copied some code from some place (which previously worked). My code does not have the word “pipe” anywhere. The only part that has “lookup” is here:

- name: Configure ansible users SSH key  
authorized\_key: user=ansible key=“{{ lookup(‘file’, ‘/etc/ansible/roles/common/files/ansible-id\_rsa.pub’) }}”  
tags: ansible-user-setup

But that tag shouldn’t be called when I use “–tags zabbix-agent”. Also that particular file is set permissions 644.

---

<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:** [June 6, 2014, 12:28pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/6 "2014-06-06T12:28:11Z")

</div>

What about a “with\_pipe” ?

Did you check both the templates and the playbooks? It seems to be in a template.

---

<div class="post-metadata">

**Author:** ![Daniel\_Ottey](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@Daniel\_Ottey](https://forum.ansible.com/u/Daniel_Ottey)\
**Post date:** [June 6, 2014, 7:18pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/7 "2014-06-06T19:18:27Z")

</div>

Thanks all. I was finally able to narrow the error down to this variable file /etc/ansible/roles/common/vars/main.yml

---

<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:** [June 6, 2014, 7:20pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/8 "2014-06-06T19:20:24Z")

</div>

datestamp: “{{ lookup(‘pipe’, ‘date +%Y%m%d-%H%M%S’) }}”

That should be the updated syntax for what you are trying to do.

---

<div class="post-metadata">

**Author:** ![Daniel\_W\_Ottey](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Daniel\_W\_Ottey](https://forum.ansible.com/u/Daniel_W_Ottey)\
**Post date:** [June 6, 2014, 7:36pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/9 "2014-06-06T19:36:00Z")

</div>

Thanks Mark. Unfortunately that still did not work for me. Here is the new error (I wish the ansible errors were a little more straight-forward)

GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [[labadmin.lab.boomi.com](http://labadmin.lab.boomi.com)] =\> Traceback (most recent call last):  
File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 532, in \_executor  
exec\_rc = self.\_executor\_internal(host, new\_stdin)  
File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 564, in \_executor\_internal  
module\_vars = template.template(self.basedir, self.module\_vars, host\_variables)  
File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 349, in template  
d[k] = template(basedir, v, vars, lookup\_fatal, depth, expand\_lists, fail\_on\_undefined=fail\_on\_undefined)  
File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 321, in template  
varname = template\_from\_string(basedir, varname, vars, fail\_on\_undefined)  
File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 562, in template\_from\_string  
res = jinja2.utils.concat(rf)  
File “”, line 8, in root  
File “/usr/lib64/python2.6/site-packages/jinja2/runtime.py”, line 179, in call  
return \_\_obj(\*args, \*\*kwargs)  
File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 554, in my\_lookup  
return lookup(\*args, basedir=basedir, \*\*kwargs)  
File “/usr/lib/python2.6/site-packages/ansible/utils/template.py”, line 91, in lookup  
ran = instance.run(\*args, inject=vars, \*\*kwargs)  
File “/usr/lib/python2.6/site-packages/ansible/runner/lookup\_plugins/pipe.py”, line 35, in run  
p = subprocess.Popen(term, cwd=self.basedir, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE)  
File “/usr/lib64/python2.6/subprocess.py”, line 642, in **init**  
errread, errwrite)  
File “/usr/lib64/python2.6/subprocess.py”, line 1234, in \_execute\_child  
raise child\_exception  
OSError: [Errno 2] No such file or directory

FATAL: all hosts have already failed – aborting

---

<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:** [June 6, 2014, 7:46pm UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/10 "2014-06-06T19:46:33Z")

</div>

it seems like you are doing a lookup with pipe and the program you are  
calling cannot be found.

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [June 7, 2014, 1:43am UTC](https://forum.ansible.com/t/a-couple-errors-recently-cropped-up/15394/11 "2014-06-07T01:43:57Z")

</div>

Generally we consider any traceback like the above to be a bug, regardless of the cause, so please do open a github issue for this. Beyond that, as Brian mentioned, apparently it’s having trouble executing the date command as it is specified. I tested the above syntax with this small playbook:

$ cat test\_pipe\_date.yml

- hosts: localhost  
connection: local  
gather\_facts: no  
vars:  
datestamp: “{{ lookup(‘pipe’, ‘date +%Y%m%d-%H%M%S’) }}”  
tasks:
- debug: var=datestamp

And it worked as expected (with the current devel branch):

TASK: [debug var=datestamp] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [127.0.0.1] =\> {  
“datestamp”: “20140606-204031”  
}

So this appears to be something specific to your platform or environment.
