From 1a737336c59062c0cc4e70eb907bb2ade2b01b62 Mon Sep 17 00:00:00 2001 From: "Gael Chamoulaud (Strider)" Date: Fri, 19 Mar 2021 14:36:41 +0100 Subject: [PATCH] Introduce tox-ansible to tripleo-validations This patch adds basic configuration for tox-ansible[1]. Tox-ansible is a plugin for tox which auto-generates tox environments for running quality assurance tools like ansible-test or molecule. This tool is rather tightly integrated for the official Molecule testing tool that integrates with Ansible. At first, it will allow us to list very quickly all the Ansible Molecule tests for each roles with their scenario(s): Example: $ tox -l ... roles-ceph-ceph-ansible-installed roles-ceph-default roles-check_kernel_version-default roles-check_network_gateway-default roles-check_rhsm_version-default roles-check_rhsm_version-rhsm_mismatch roles-check_undercloud_conf-config_OK roles-check_undercloud_conf-default roles-check_undercloud_conf-deprecated_drivers roles-check_undercloud_conf-deprecated_params roles-check_undercloud_conf-required_missing ... However, we won't be able to execute them as it for now without to make some small manual modifications in the molecule.yml file first before to execute them. This will be covered as soon as possible in a following-patch. [1] - https://github.com/ansible-community/tox-ansible Signed-off-by: Gael Chamoulaud (Strider) Change-Id: Ia1606db814f37a11e48508139b90cdd43c083f6b (cherry picked from commit edb1ad92101d11a0d485eb3bbb05052e3daaeb21) (cherry picked from commit 07c1e0f9b892be3494c99ba21a614e92c8c366bc) (cherry picked from commit b7b6b3f3c80ead9303c8ab828465a085f2580682) --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index ecbe0e867..0ec7356bf 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,8 @@ minversion = 2.0 envlist = linters,docs,py37,molecule skipdist = True +requires = + tox-ansible >= 1.0.5 [testenv] usedevelop = True @@ -114,3 +116,8 @@ commands= # Settings for doc8: extensions = .rst ignore = D001 + +[ansible] +description = Used as base for all tox-ansible environments +molecule_opts = + --debug