Ansible Molecule Test Error: cannot reload udev rules: exit status 1

I’m trying to set up Ansible molecule for testing roles on different OSes. For example, this role is failing when it gets to the task that installs with snap install core:

https://github.com/ProfessorManhattan/Ansible-Role-Snapd

The error I receive is:

TASK [professormanhattan.snapd : Ensure fuse filesystem is installed] **********
ok: [Ubuntu-20.04]

TASK [professormanhattan.snapd : Ensure snap is started and enabled on boot] ***
changed: [Ubuntu-20.04]

TASK [professormanhattan.snapd : Ensure snap core is installed] ****************
fatal: [Ubuntu-20.04]: FAILED! => {"changed": false, "channel": "stable", "classic": false, "cmd": "sh -c "/usr/bin/snap install core"", "msg": "Ooops! Snap installation failed while executing 'sh -c "/usr/bin/snap install core"', please examine logs and error output for more details.", "rc": 1, "stderr": "error: cannot perform the following tasks:n- Setup snap "core" (10823) security profiles (cannot reload udev rules: exit status 1nudev output:nFailed to send reload request: No such file or directoryn)n", "stderr_lines": ["error: cannot perform the following tasks:", "- Setup snap "core" (10823) security profiles (cannot reload udev rules: exit status 1", "udev output:", "Failed to send reload request: No such file or directory", ")"], "stdout": "", "stdout_lines": []}

The same is true for all the other operating systems I’m trying to test. Here’s a link to the Dockerfile I’m using to build the Ubuntu image:

https://gitlab.com/megabyte-space/dockerfile/ansible-molecule-ubuntu-20.04/-/blob/master/Dockerfile

Looking for a geerlingguy.

Source: Docker Questions