Some linting, and correcting deps for sanity

ansible-test seems to take the latest ansible-core by default, even if
we push upper/lower constraints in the requirements.txt or
test-requirements.txt.

Pushing the constraint directly in the tox.ini, for the "sanity"
testenv, seems to do the trick, as we're testing against an ansible
version we actually support, instead of the latest (2.13 today).

This patch also takes the opportunity to remove unwanted warnings
(ansible.cfg deprecated options), as well as ensuring the ignored
content for `ansible-test' doesn't raise any warning.

Closes-Bug: #1976251
Change-Id: I596aecd71ebe7d8a747ab8e6d05766f70dd78f1d
This commit is contained in:
Cédric Jeanneret
2022-05-30 14:12:27 +02:00
parent e5450815d3
commit 5f1069ba9a
3 changed files with 2 additions and 3 deletions

View File

@@ -1,8 +1,7 @@
[defaults] [defaults]
gathering = smart gathering = smart
command_warnings = False
retry_files_enabled = False retry_files_enabled = False
callback_whitelist = profile_tasks callbacks_enabled = profile_tasks
# Attempt to load custom modules whether it's installed system-wide or from a virtual environment # Attempt to load custom modules whether it's installed system-wide or from a virtual environment
roles_path = roles:$VIRTUAL_ENV/share/ansible/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:$VIRTUAL_ENV/usr/share/ansible/roles roles_path = roles:$VIRTUAL_ENV/share/ansible/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:$VIRTUAL_ENV/usr/share/ansible/roles

View File

@@ -2,4 +2,3 @@ plugins/modules/ara_graphite.py validate-modules:missing-gplv3-license
plugins/modules/ara_influxdb.py validate-modules:missing-gplv3-license plugins/modules/ara_influxdb.py validate-modules:missing-gplv3-license
plugins/modules/flatten_nested_dict.py validate-modules:missing-gplv3-license plugins/modules/flatten_nested_dict.py validate-modules:missing-gplv3-license
plugins/modules/sova.py validate-modules:missing-gplv3-license plugins/modules/sova.py validate-modules:missing-gplv3-license
plugins/modules/sova.py pylint:use-a-generator

View File

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