From 5f1069ba9aacf207c94d89d97b43d36985e9e908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Mon, 30 May 2022 14:12:27 +0200 Subject: [PATCH] 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 --- ansible.cfg | 3 +-- tests/sanity/ignore-2.10.txt | 1 - tox.ini | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index aa05284..a5c73d8 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,8 +1,7 @@ [defaults] gathering = smart -command_warnings = 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 roles_path = roles:$VIRTUAL_ENV/share/ansible/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:$VIRTUAL_ENV/usr/share/ansible/roles diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index 394b432..83ff2bf 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -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/flatten_nested_dict.py validate-modules:missing-gplv3-license plugins/modules/sova.py validate-modules:missing-gplv3-license -plugins/modules/sova.py pylint:use-a-generator diff --git a/tox.ini b/tox.ini index 1cd5a5a..f803f74 100644 --- a/tox.ini +++ b/tox.ini @@ -75,6 +75,7 @@ description = Used as base for all tox-ansible environments [testenv:sanity] usedevelop = False deps = + ansible-core>=2.11,<2.12 [testenv:units] usedevelop = False