ansible-lint: Use the same command line as galaxy-importer

Currently, there is a hard coded timeout in galaxy-importer that
prevents larger collections to execute the ansible-lint step [1].

This patch modifies the calls to ansible-lint on development tools and
upstream CI to use the same arguments as galaxy-importer and disables
the execution of the ansible-lint step for the Ansible's sanity test.

Requested ansible-lint version for tools is also updated, as a more
recent one is required.

This change will not allow development using an environment using Python
2.7, due to newer ansible-lint requirements. Roles and modules tests
against target nodes using Python 2.7 is still possible.

[1]: https://github.com/ansible/galaxy-importer/pull/231
This commit is contained in:
Rafael Guterres Jeffman
2023-07-20 19:14:04 -03:00
parent cf779e43bb
commit 3534fcdce7
5 changed files with 17 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ playbook_dirs=(
"tests"
"playbooks"
)
ansible-lint --force-color "${playbook_dirs[@]}"
ansible-lint --offline --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --force-color "${playbook_dirs[@]}"
echo -e "${INFO}Running 'ansible-doc-test'...${RST}"
python "${topdir}/ansible-doc-test" -v roles plugins