CI/molecule: use common vars as well and simplify run (#13520)

The molecule_run.sh isn't really needed since the switch to gitlab-ci
matrix runs.

Also use the inventory variables pattern for kata-containers.
This commit is contained in:
Max Gautier
2026-09-17 09:09:23 +00:00
committed by GitHub
parent bd20622a16
commit 66f8da3f04
9 changed files with 40 additions and 45 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ pre-commit run -a # To run pre-commit hook on all files in the repository, even
#### Molecule
[molecule](https://github.com/ansible-community/molecule) is designed to help the development and testing of Ansible roles. In Kubespray you can run it all for all roles with `./tests/scripts/molecule_run.sh` or for a specific role (that you are working with) with `molecule test` from the role directory (`cd roles/my-role`).
[molecule](https://github.com/ansible-community/molecule) is designed to help the development and testing of Ansible roles. In Kubespray you can run it all for all roles with `find roles -name molecule -type d -execdir molecule test --all -- -e @$PWD/tests/common_vars.yml \;` or for a specific role (that you are working with) with `molecule test` from the role directory (`cd roles/my-role`).
When developing or debugging a role it can be useful to run `molecule create` and `molecule converge` separately. Then you can use `molecule login` to SSH into the test environment.