Molecule converge fails : When hosts is all

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

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

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

This is my install.yml