# old 'cached' playbook seems getting executed and new playbooks fail without sudo

**URL:** <https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161>\
**Category:** Ansible Project\
**Created:** [July 19, 2013, 8:31am UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161 "2013-07-19T08:31:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Maarten](https://forum.ansible.com/u/Maarten)\
**Post date:** [July 19, 2013, 8:31am UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161/1 "2013-07-19T08:31:55Z")

</div>

Hello,

It seems some cached playbook keeps getting executed while playing an new playbook. Because ‘the old playbook’ needs root permissions any playbook on this host fails.

I understand [host.example.com](http://host.example.com):/home/maarten/.ansible/tmp gets rewritten so removing has no use (but what is the source, where is the cache?)

**ansible version:** 1.2.2

**test playbook:** playbooks/ping.yaml

---

<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 19, 2013, 8:45pm UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161/2 "2013-07-19T20:45:20Z")

</div>

Ansible does not have a cache here.

Not having permission to stat has been fixed in Ansible 1.3, you can easily use 1.3 by doing a git checkout and then:

source ./hacking/env-setup

---

<div class="post-metadata">

**Author:** ![Maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Maarten](https://forum.ansible.com/u/Maarten)\
**Post date:** [July 20, 2013, 12:15pm UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161/3 "2013-07-20T12:15:59Z")

</div>

Hi Michael,

Thanks. Tested with Ansible 1.3 and works for me.

The ‘caching’ was stupid assumption of me; I just had made a playbook which did stuff on /var/named/chroot/etc/named which also didn’t work without ‘sudo’. It confused me.

I actually posted another but similar error, here the ‘right one’:

OSError: [Errno 13] Permission denied: ‘/var/named/chroot/etc/named’

What I understand, the ‘gathering fact’ scripts is causing the error: it tries to gather facts only root is entitled to. This will happen with this chrooted named, but also with mount points on root only directories (the error posted)

Ansible 1.3 fixes this.

Right?

Maarten

---

<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 20, 2013, 3:44pm UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161/4 "2013-07-20T15:44:34Z")

</div>

Should be the case, yes.

Let me know if you see any fact permission errors under 1.3.

---

<div class="post-metadata">

**Author:** ![Maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Maarten](https://forum.ansible.com/u/Maarten)\
**Post date:** [July 20, 2013, 5:24pm UTC](https://forum.ansible.com/t/old-cached-playbook-seems-getting-executed-and-new-playbooks-fail-without-sudo/13161/5 "2013-07-20T17:24:42Z")

</div>

run on 45 RHEL5 and 63 RHEL6 systems. Most of them different configurations/applications/hardware/vm. With Ansible 1.2.2: 5 systems got fact permission errors. Those systems all have a filesystem (or file bind) mounted on a root only directory.

With Ansible 1.3 no errors
