molecule list command generate warnings and critical

21 views Asked by At

I've created an ansible role to deploy apache2 on vbox instance.

My apache2 ansible role tree is (classical) :

 - .tox/
 - defaults/
 - files/
 - handlers/
 - meta/
 - molecule/
 - tasks/
 - templates/
 - tests/
 - vars/
 - .gitignore
 - .ansible-lint
 - .yamllint
 - tox.ini
 - venv.sh

Problem When I do molecule list (from apache2 project), I have a lot of errors like (only from ansible-collections) :

WARNING The scenario config file ('/home/user/dev/role-apache2/.tox/py3-ansible/lib/python3.11/site-packages/ansible_collections/dellemc/openmanage/roles/idrac_certificate/molecule/generateCSR/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.

CRITICAL Failed to validate /home/user/dev/apache2/.tox/py3-ansible/lib/python3.11/site-packages/ansible_collections/community/okd/molecule/default/molecule.yml ["Additional properties are not allowed ('lint' was unexpected)"]

When I clone ansible-redis-role from Jeff Geerling repo then I put my tox.ini with venv.sh script, the .tox/ directory is ignored and molecule list works fine.

There is no diff between .ansible-lint, .yamllint, .gitignore files from these two projects.

Tox file is like

[tox]
recreate = true
requires =
    tox>=4
skipsdist = true
env_list = py{3}-ansible

[testenv]
passenv = *
basepython=python3
deps =
    ansible==9.3.0
    ansible-lint==24.2.1
    docker==7.0.0 (only for redis project)
    molecule==24.2.0
    molecule-plugins[vagrant]==23.5.3
    paramiko==3.4.0
    python-vagrant==1.0.*
    setuptools==69.2.*
    testinfra==6.0.0
    PyYAML==6.0.1
    yamllint==1.35.1

How can I tell to Molecule to ignore all what's inside .tox/ ?

0

There are 0 answers