Closed ssbarnea closed 3 years ago
I have proposed a fix with a pull request.
(venv-mol) [james@e6230 example]$ mol destroy INFO default scenario test matrix: dependency, cleanup, destroy INFO Performing prerun... INFO Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:../../../../.cache/roles INFO Running default > dependency WARNING Skipping, missing the requirements file. WARNING Skipping, missing the requirements file. INFO Running default > cleanup WARNING Skipping, cleanup playbook not configured. INFO Running default > destroy CRITICAL Current user doesn't belong to libvirt group. Running 'usermod --append --groups libvirt
whoami
'and 'newgrp libvirt' should fix it.
When libvirt is not yet correctly configured for current user, you will get an error like:
This is usually fixed by running:
Can we do something to make molecule more aware of broken setups and hint the user about ways to fix his environment?
We should add some code inside the driver sanity check method that checks for this and prevent even starting execution of a scenario if libvirt is broken.