Dear community members,
I have some trouble running tox-lsr
integration tests. The following code block shows an example of the command I run and the errors I get:
$ tox -e qemu-ansible-core-2.11 -- --config ~/.config/linux-system-roles.json --image-name fedora-35 -u root -- tests/tests_default.yml
qemu-ansible-core-2.11 installed: ansible-core==2.11.10,beautifulsoup4==4.10.0,cffi==1.15.0,cryptography==36.0.2,Jinja2==3.1.1,MarkupSafe==2.1.1,packaging==21.3,productmd==1.33,pycparser==2.21,pyparsing==3.0.7,PyYAML==6.0,resolvelib==0.5.4,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,six==1.16.0,soupsieve==2.3.1
qemu-ansible-core-2.11 run-test-pre: PYTHONHASHSEED='885645574'
qemu-ansible-core-2.11 run-test: commands[0] | python /home/tronde/python-venv/tox/lib64/python3.10/site-packages/tox_lsr/test_scripts/runqemu.py --config /home/tronde/.config/linux-system-roles.json --image-name fedora-35 -u root -- tests/tests_default.yml
ansible-playbook [core 2.11.10]
config file = None
configured module search path = ['/home/tronde/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tronde/ansible/roles/pam_pwd/.tox/qemu-ansible-core-2.11/lib/python3.10/site-packages/ansible
ansible collection location = /home/tronde/.ansible/collections:/usr/share/ansible/collections
executable location = /home/tronde/ansible/roles/pam_pwd/.tox/qemu-ansible-core-2.11/bin/ansible-playbook
python version = 3.10.3 (main, Mar 18 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
jinja version = 3.1.1
libyaml = True
No config file found; using defaults
[DEPRECATION WARNING]: ANSIBLE_CALLBACK_WHITELIST option, normalizing names to new standard, use ANSIBLE_CALLBACKS_ENABLED instead. This feature will be removed from ansible-core in version 2.15.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: * Failed to parse /home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2 with script plugin: Inventory script (/home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-
qcow2) had an execution error: Traceback (most recent call last): File "/home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2", line 14, in <module> import yaml
ModuleNotFoundError: No module named 'yaml'
[WARNING]: * Failed to parse /home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2 with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got from
each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. mapping values are not allowed in this context The error appears to be in
'/home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2': line 30, column 4, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:
try: ^ here
[WARNING]: * Failed to parse /home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2 with ini plugin: /home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2:9: Expected
key=value host variable assignment, got: os
I guess the main issue is the following error:
[WARNING]: * Failed to parse /home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2 with script plugin: Inventory script (/home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-
qcow2) had an execution error: Traceback (most recent call last): File "/home/tronde/ansible/roles/pam_pwd/.tox/standard-inventory-qcow2", line 14, in <module> import yaml
ModuleNotFoundError: No module named 'yaml'
But as far as I could tell the appropriate module has been installed:
Requirement already satisfied: pyyaml in /home/tronde/python-venv/tox/lib/python3.10/site-packages (6.0)
I’m stuck here and don’t know how to troubleshoot and solve this issue. Any help is appreciated. Please bear with me, as I don’t have much experience with python and venv.
Best regards,
Tronde