tox: molecule extra requirements

Pass extra molecule dependencies via file and not via environment
variable. Also add selinux as a permanent molecule dependency
(molecule needs it on selinux enabled systems to setup containers).
This commit is contained in:
Jiri Kucera 2020-01-20 13:23:38 +01:00
parent 8c5baff2a6
commit ad6cffe19d
4 changed files with 6 additions and 16 deletions

View file

@ -26,5 +26,3 @@
#
# - RUN_FLAKE8_DISABLED
#
export LSR_MOLECULE_DEPS='-rmolecule_requirements.txt'

View file

@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT
# Write extra requirements for running molecule here:
jmespath

View file

@ -1,3 +0,0 @@
# SPDX-License-Identifier: MIT
jmespath
selinux

13
tox.ini
View file

@ -172,21 +172,12 @@ commands =
bash -c 'cd ..; bash .travis/fix-coverage.sh; cd -'
coveralls
# LSR_MOLECULE_DEPS may contain aditional Molecule dependencies. For example,
# in `network` system role, LSR_MOLECULE_DEPS can be set as
#
# LSR_MOLECULE_DEPS='-rmolecule_requirements.txt'
#
# where `molecule_requirements.txt` contains two lines:
#
# jmespath
# selinux
#
[molecule_common]
deps =
docker
molecule
{env:LSR_MOLECULE_DEPS:}
selinux
-rmolecule_extra_requirements.txt
[testenv:molecule_lint]
envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule}