# Run the playbooks on the same host

**URL:** <https://forum.ansible.com/t/run-the-playbooks-on-the-same-host/18859>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [July 27, 2015, 7:13am UTC](https://forum.ansible.com/t/run-the-playbooks-on-the-same-host/18859 "2015-07-27T07:13:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valeriy\_Solovyov](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@Valeriy\_Solovyov](https://forum.ansible.com/u/Valeriy_Solovyov)\
**Post date:** [July 27, 2015, 7:13am UTC](https://forum.ansible.com/t/run-the-playbooks-on-the-same-host/18859/1 "2015-07-27T07:13:19Z")

</div>

Hi,

I try to run playbook in parallel but there were errors because some modules are blocked by system:

I tried run ansible instances:  
ansible -c local 127.0.0.1 -i 127.0.0.1, -m apt -a “update\_cache=yes”

and one returns:

127.0.0.1 | success \>\> {  
“changed”: false  
}

another returns:

127.0.0.1 | FAILED \>\> {  
“failed”: true,  
“msg”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1437980681.19-103211541037606/apt", line 1565, in \n main()\n File "/root/.ansible/tmp/ansible-tmp-1437980681.19-103211541037606/apt", line 438, in main\n cache.open(progress=None)\n File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 147, in open\n self.\_records = apt\_pkg.PackageRecords(self.\_cache)\nSystemError: E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_restricted\_binary-i386\_Packages - open (2: No such file or directory), E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_main\_binary-i386\_Packages - open (2: No such file or directory), E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_multiverse\_binary-amd64\_Packages - open (2: No such file or directory), E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_universe\_binary-amd64\_Packages - open (2: No such file or directory), E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_restricted\_binary-amd64\_Packages - open (2: No such file or directory), E:Could not open file /var/lib/apt/lists/il.archive.ubuntu.com\_ubuntu\_dists\_precise\_main\_binary-amd64\_Packages - open (2: No such file or directory)\n”,  
“parsed”: false  
}

Maybe there are options to wait while one ansible module/OS are use apt/dpkg or whatever???

Regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 27, 2015, 7:22am UTC](https://forum.ansible.com/t/run-the-playbooks-on-the-same-host/18859/2 "2015-07-27T07:22:31Z")

</div>

Please try this:

ansible -i ‘localhost,’ --connection=local -m apt -a “update\_cache=yes”
