From be35c2c8c7465200990c2032166a3155a3a31e53 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Thu, 2 Jan 2025 14:50:27 +0100 Subject: [PATCH] Remove ansible-lint from tobiko While tobiko master branch supports both python3.12 (needed for opendev CI) and infrared (needed for downstream RHOSP CI), running ansible-lint will not be possible due to the following incompatibility: - in order to support python3.12, ansible-lint version v6.16.0 or greater needs to be used due to [1] and [2] - with ansible-lint versions greater than v6, some of the errors raised are not compatible with ansible-core 2.9, which is the version used by infrared [3]. For example, fixing the following ansible-lint error would break infrared support: fqcn[action]: Use FQCN for module actions, such `ansible.posix.synchronize`. infrared_plugin/roles/tobiko-ir-deploy/tasks/main.yaml:58 Action `synchronize` is not FQCN. [1] https://github.com/ansible/ansible-lint/issues/2945 [2] https://github.com/ansible/ansible-lint/issues/3408 [3] https://github.com/redhat-openstack/infrared/blob/6c280e56c175f970916026cc334aecc03b0bfc6c/requirements.txt#L12 Change-Id: I0ef09f2e3dced3401b4d41cb51c68e6dffd34798 --- .ansible-lint | 21 --------------------- .pre-commit-config.yaml | 6 ------ tox.ini | 10 ---------- 3 files changed, 37 deletions(-) delete mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint deleted file mode 100644 index 882e6e0a5..000000000 --- a/.ansible-lint +++ /dev/null @@ -1,21 +0,0 @@ ---- - -exclude_paths: - - roles/infrared/ - - zuul.d/ - - .*.yaml - - tobiko/ - - releasenotes/ - # TODO(eolivare) remove the following excluded_paths after having fixed - # ansible-lint errors - - infrared_plugin/ - - roles/ - - playbooks/ - - -skip_list: - - '206' - - '306' - - '403' - - '502' - - '701' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3463a1bff..a851e3605 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,12 +42,6 @@ repos: pass_filenames: false # args: [--ignore-missing-imports] - - repo: https://github.com/ansible/ansible-lint.git - rev: v6.21.1 - hooks: - - id: ansible-lint - files: \.(yaml|yml)$ - - repo: local hooks: - id: pylint diff --git a/tox.ini b/tox.ini index bacbdda0a..c8c07bcf5 100644 --- a/tox.ini +++ b/tox.ini @@ -102,16 +102,6 @@ setenv = {[testenv:pep8]setenv} -[testenv:ansible-lint] -basepython = {[testenv:pep8]basepython} -deps = {[testenv:pep8]deps} -envdir = {toxworkdir}/pep8 -commands = - pre-commit run -a ansible-lint -setenv = - {[testenv:pep8]setenv} - - [testenv:linters] basepython = {[testenv:pep8]basepython}