hi, I was trying to upgrade ansible to the newest version. But when I test 
the my roles on molecule, I've got something which I could not find any 
solution. Here is the pip freeze;
(test) gg@gg-berk:~/ansible$ pip freeze
aiofiles==23.2.1
aiohttp==3.9.5
aiosignal==1.3.1
alabaster==0.7.16
ansible==9.4.0
ansible-compat==4.1.11
ansible-core==2.16.6
ansible-doc-extractor==0.1.10
ansible-lint==24.2.2
ansible-pygments==0.1.1
antsibull-changelog==0.17.0
antsibull-core==2.2.1
antsibull-docs==1.11.1
antsibull-docs-parser==1.0.1
arrow==1.3.0
async-timeout==4.0.3
asyncio-pool==0.6.0
attrs==23.2.0
Babel==2.14.0
backports.tarfile==1.1.0
bcrypt==4.0.1
binaryornot==0.4.4
black==24.4.0
bracex==2.4
build==1.2.1
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
click-help-colors==0.9.4
colorama==0.4.6
commonmark==0.9.1
cookiecutter==2.6.0
cryptography==42.0.5
distlib==0.3.8
distro==1.9.0
docker==7.0.0
docutils==0.18.1
enrich==1.2.7
exceptiongroup==1.2.0
filelock==3.13.4
flake8==6.0.0
frozenlist==1.4.1
identify==2.5.35
idna==3.7
imagesize==1.4.1
importlib_metadata==7.1.0
iniconfig==2.0.0
jaraco.classes==3.4.0
jaraco.context==5.3.0
jaraco.functools==4.0.0
jeepney==0.8.0
Jinja2==3.1.3
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
keyring==25.1.0
MarkupSafe==2.1.5
mccabe==0.7.0
molecule==24.2.1
molecule-docker==2.1.0
molecule-plugins==23.5.3
molecule-podman==2.0.3
molecule-vagrant==2.0.0
more-itertools==10.2.0
multidict==6.0.5
mypy-extensions==1.0.0
netaddr==1.2.1
nodeenv==1.8.0
packaging==24.0
pathspec==0.12.1
perky==0.9.2
platformdirs==4.2.0
pluggy==1.4.0
podman==4.5.1
pre-commit==3.3.3
pycodestyle==2.10.0
pycparser==2.22
pydantic==1.10.15
pyflakes==3.0.1
Pygments==2.17.2
pyproject-api==1.6.1
pyproject_hooks==1.0.0
pytest==7.4.0
pytest-html==4.1.1
pytest-metadata==3.1.1
pytest-molecule==2.0.0
pytest-testinfra==8.1.0
python-dateutil==2.9.0.post0
python-slugify==8.0.4
python-vagrant==1.0.0
pyxdg==0.28
PyYAML==6.0.1
referencing==0.34.0
requests==2.31.0
resolvelib==1.0.1
rich==12.6.0
rpds-py==0.18.0
rstcheck==6.1.2
rstcheck-core==1.0.3
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
SecretStorage==3.3.3
selinux==0.3.0
semantic-version==2.10.0
sh==1.14.3
shellingham==1.5.4
six==1.16.0
snowballstemmer==2.2.0
Sphinx==6.2.1
sphinx-ansible-theme==0.10.2
sphinx-rtd-theme==1.2.2
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
subprocess-tee==0.4.1
tenacity==8.2.3
text-unidecode==1.3
tomli==2.0.1
tox==4.14.2
Twiggy==0.5.1
typer==0.7.0
types-docutils==0.19.1.9
types-python-dateutil==2.9.0.20240316
typing_extensions==4.11.0
urllib3==1.26.18
virtualenv==20.25.2
wcmatch==8.5.1
yamllint==1.32.0
yarl==1.9.4
zipp==3.18.1

And here is the output I got; 

(test) gg@gg-berk:~/ansible/roles/k3s_node$ molecule destroy
WARNING Driver vagrant does not provide a schema.
INFO default scenario test matrix: dependency, cleanup, destroy
INFO Performing prerun with role_name_check=0...
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)] 
********************************************
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: ModuleNotFoundError: No module named 
'ansible.module_utils.common.yaml'
fatal: [localhost]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File "<stdin>", line 107, in <module>
File "<stdin>", line 99, in _ansiballz_main
File "<stdin>", line 47, in invoke_module
File "/usr/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File 
"/tmp/ansible_vagrant_payload_oj79prkm/ansible_vagrant_payload.zip/ansible/modules/vagrant.py",
 
line 38, in <module>
File "/home/gg/ansible/test/lib/python3.10/site-packages/molecule/util.py", 
line 37, in <module>
from molecule.app import app
File "/home/gg/ansible/test/lib/python3.10/site-packages/molecule/app.py", 
line 14, in <module>
app = App()
File "/home/gg/ansible/test/lib/python3.10/site-packages/molecule/app.py", 
line 11, in __init__
self.runtime = Runtime(isolated=False)
File 
"/home/gg/ansible/test/lib/python3.10/site-packages/ansible_compat/runtime.py", 
line 224, in __init__
from ansible.utils.display import Display
File 
"/home/gg/ansible/test/lib/python3.10/site-packages/ansible/utils/display.py", 
line 49, in <module>
from ansible import constants as C
File 
"/home/gg/ansible/test/lib/python3.10/site-packages/ansible/constants.py", 
line 12, in <module>
from ansible.config.manager import ConfigManager
File 
"/home/gg/ansible/test/lib/python3.10/site-packages/ansible/config/manager.py", 
line 21, in <module>
from ansible.module_utils.common.yaml import yaml_load
ModuleNotFoundError: No module named 'ansible.module_utils.common.yaml'
module_stdout: ''
msg: |-
MODULE FAILURE
See 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


I have no problem with podman or docker, but when it comes to the vagrant I 
got the error above.
** If you have any idea on how to resolve this problem, it would be amazing!

related molecule.yml;

---
scenario:
name: default
test_sequence:
- destroy
- dependency
- syntax
- create
- prepare
- converge
- idempotence
- verify
- destroy

dependency:
name: galaxy

driver:
name: vagrant
ssh_connection_options:
- "-o ControlPath=~/.ansible/cp/%r@%h-%p"
- "-o ForwardAgent=yes"
- "-o ControlMaster=auto"
- "-o ControlPersist=60s"
- "-o StrictHostKeyChecking=no"
- "-o UserKnownHostsFile=/dev/null"
provider:
name: virtualbox

platforms:
- name: instance-focal
interfaces:
- network_name: private_network
ip: xxx
box: ubuntu/focal64
memory: 1024
cpus: 1
provider_raw_config_args:
- "customize [ 'modifyvm', :id, '--uartmode1', 'disconnected' ]"
provision: true


provisioner:
name: ansible
log: true
become: true
config_options:
defaults:
stdout_callback: yaml
bin_ansible_callbacks: true
connection:
pipelining: true

verifier:
name: testinfra
options:
v: 1
sudo: true

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e189f9dd-bb25-4b91-8f0a-b61c8737f260n%40googlegroups.com.

Reply via email to