Skip to content

Commit

Permalink
Fix test roles linting
Browse files Browse the repository at this point in the history
Not sure if the issue is on molecule or ansible-lint or
ansible-lint precommit but currently ansible-lint is failing
at syntax-check[specific] due to unable to find the role
roles.${driver}plugin when looking at the tests/test.yml
generated by the galaxy skeleton (patched by molecule to
include the namespace):

---
- hosts: localhost
  remote_user: root
  roles:
    - roles.dockerplugin

Given that this file is neither what we want to test nor
something the plugins created, just kill it.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
  • Loading branch information
apatard committed Jun 28, 2023
1 parent 4afb087 commit 3676f28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/generate-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ while IFS='' read -r line; do DRIVER_NAMES+=("$line"); done < <(python "tools/ex
cd test/roles
for DRIVER_NAME in "${DRIVER_NAMES[@]}"; do
molecule init role roles."${DRIVER_NAME}"plugin --driver-name="${DRIVER_NAME}"
# Not sure if the issue is in molecule or ansible-lint or pre-commit ansible-lint hook
# As a workaround, kill the offending files.
rm -rf "${DRIVER_NAME}"plugin/tests
done

exit 0

0 comments on commit 3676f28

Please sign in to comment.