# Molecule converge fails : When hosts is all

**URL:** <https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [February 28, 2022, 8:13pm UTC](https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379 "2022-02-28T20:13:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![selvigp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/selvigp/32/4977_2.png) [@selvigp](https://forum.ansible.com/u/selvigp)\
**Post date:** [February 28, 2022, 8:13pm UTC](https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379/1 "2022-02-28T20:13:31Z")

</div>

Hi,

I have tried to run molecule test for my Ansible role which contains install iptable dependencies. If I set hosts: localhost in converge.yml it is working fine. But if I give hosts: all throwing below error. I am using docker driver with ubuntu 18.04 installed on it to run my test.

TASK [twmn.twmn.iptable : Install dependencies] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: Updating cache and auto-installing missing dependency: python3-apt  
fatal: [instance]: FAILED! =\> {“changed”: false, “cmd”: “apt-get update”, “msg”: “[Errno 2] No such file or directory: b’apt-get’: b’apt-get’”, “rc”: 2, “stderr”: “”, “stderr\_lines”: , “stdout”: “”, “stdout\_lines”: }

Anyhelp will be appreciable.

Thanks  
selvi

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [March 1, 2022, 7:12am UTC](https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379/2 "2022-03-01T07:12:25Z")

</div>

We need more info that this.  
What does the task file look like?  
Etc

---

<div class="post-metadata">

**Author:** ![selvigp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/selvigp/32/4977_2.png) [@selvigp](https://forum.ansible.com/u/selvigp)\
**Post date:** [March 1, 2022, 8:14am UTC](https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379/3 "2022-03-01T08:14:19Z")

</div>

Tasks contain install iptable, iptable-persistent dependencies on ubuntu18.04.

---

<div class="post-metadata">

**Author:** ![selvigp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/selvigp/32/4977_2.png) [@selvigp](https://forum.ansible.com/u/selvigp)\
**Post date:** [March 1, 2022, 8:20am UTC](https://forum.ansible.com/t/molecule-converge-fails-when-hosts-is-all/36379/4 "2022-03-01T08:20:51Z")

</div>

This is my install.yml

| |
