Closed OGrigorios closed 11 months ago
I don't see libvirt
among the Molecule modules, and it seems molecule-libvirt has been archived.
Can you run a verbose molecule test
?
Hm, that is true. But I am using libvirt through Vagrant, so I thought vagrant handles libvirt and molecule handels Vagrant. Maybe I am wrong in this assumption. The moleucle test:
❯ molecule test
WARNING Driver vagrant does not provide a schema.
INFO default scenario test matrix: dependency, cleanup, destroy, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy
INFO Performing prerun with role_name_check=0...
INFO Set ANSIBLE_LIBRARY=/home/g7s/.cache/ansible-compat/0e2a58/modules:/home/g7s/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/home/g7s/.cache/ansible-compat/0e2a58/collections:/home/g7s/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/home/g7s/.cache/ansible-compat/0e2a58/roles:/home/g7s/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /home/g7s/.cache/ansible-compat/0e2a58/roles/g7s.unbound symlink to current repository in order to enable Ansible to find the role using its expected full name.
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
PLAY [Destroy] *****************************************************************
TASK [Destroy molecule instance(s)] ********************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "ERROR: Driver missing, install python-vagrant.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
CRITICAL Ansible return code was 2, command was: ['ansible-playbook', '--inventory', '/home/g7s/.cache/molecule/unbound/default/inventory', '--skip-tags', 'molecule-notest,notest', '/usr/lib/python3.11/site-packages/molecule_plugins/vagrant/playbooks/destroy.yml']
WARNING An error occurred during the test sequence action: 'destroy'. Cleaning up.
INFO Running default > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running default > destroy
PLAY [Destroy] *****************************************************************
TASK [Destroy molecule instance(s)] ********************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "ERROR: Driver missing, install python-vagrant.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
CRITICAL Ansible return code was 2, command was: ['ansible-playbook', '--inventory', '/home/g7s/.cache/molecule/unbound/default/inventory', '--skip-tags', 'molecule-notest,notest', '/usr/lib/python3.11/site-packages/molecule_plugins/vagrant/playbooks/destroy.yml']
The schema warning is just a warning. It could have been written at "info" severity level but it's better to have it as warning so that we don't forget to provide driver specific schema.
TASK [Destroy molecule instance(s)] ******************************************** fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "ERROR: Driver missing, install python-vagrant.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Looks like you're missing python-vagrant. Did you install it ?
It wasn't installed... Ouch. It is running now. Thank you for your quick help, guys!
I am currently facing the issue of wanting to run molecule with vagrant+libvirt. I have verified that I can create virtual machines with vagrant+libvirt via vagrant-cli. This perhaps leads to the error of:
My molecule.yml:
And my converge.yml
And the output from
molecule --version
I would appreciate any indicators of what might be wrong here. There was a similar issue in 2017, but that did not help me.