Fix ansible sanity job

The ansible sanity job was failing because the new node
that runs the job was updated and no longer have python 3.8.
In order to use python 3.10 you need to update ansible-core
to at least 2.13, doing so, it also requires that we add
the ignore-2.13.txt, and update the zuul.d/layout.yaml.
The pylint complains then about use-a-generator, so updating
sova to fix the issue, once the PEP0289 [1] is from 2003,
it should work on all python versions.

1 - https://peps.python.org/pep-0289/

Change-Id: I1370d41b0c4e057c1c65cfd75ff945d648696771
This commit is contained in:
Arx Cruz 2022-11-14 11:48:01 +01:00
parent adab619a16
commit d543dd8be9
4 changed files with 4 additions and 3 deletions

View File

@ -181,7 +181,7 @@ def line_match(pat, line, exclude=None):
return False
if found.groups():
if exclude:
if any([i in found.group(1) for i in exclude]):
if any(i in found.group(1) for i in exclude):
return False
return found.group(1)
return True

View File

@ -0,0 +1 @@
ignore-2.10.txt

View File

@ -75,7 +75,7 @@ description = Used as base for all tox-ansible environments
[testenv:sanity]
usedevelop = False
deps =
ansible-core>=2.11,<2.12
ansible-core>=2.11,<2.14
[testenv:units]
usedevelop = False

View File

@ -6,7 +6,7 @@
vars:
tox_envlist: sanity # dynamic tox env added by tox-ansible
# we want to run sanity only on py38 instead of implicit 2.6-3.9 range
tox_extra_args: -- --python 3.8
tox_extra_args: -- --python 3.10
- job:
name: tox-ansible-test-units