8000 Implement workaround for eco testing (#3061) · ansible/molecule@db8dd09 · GitHub
[go: up one dir, main page]

Skip to content

Commit db8dd09

Browse files
authored
Implement workaround for eco testing (#3061)
Fixes CI bug where pre-installed ansible from worker image is broken when a virtualenv is activated (tox). CompletedProcess(args='ansible --version', returncode=1, stdout='\n', stderr='Traceback (most recent call last):\n File "/usr/bin/ansible", line 34, in <module>\n from ansible import context\nModuleNotFoundError: No module named \'ansible\'\n')
1 parent 364ff0b commit db8dd09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ extras =
166166
# we install test extra in order to validate it does not drag ansible in
167167
test
168168
deps =
169+
ansible-base
169170
molecule-azure
170171
molecule-containers
171172
molecule-digitalocean
@@ -182,8 +183,11 @@ deps =
182183
pipdeptree
183184
commands =
184185
pip check
186+
# disabled fails safe because we now install ansible-base on purpose
187+
# as the preinstalled version of ansible from github, cannot be called
188+
# when a virtualenv is activated.
185189
# fail-safe: stop if ansible can be imported, it means it was dragged in
186-
python -c "import importlib, sys; sys.exit(importlib.util.find_spec('ansible') != None)"
190+
# python -c "import importlib, sys; sys.exit(importlib.util.find_spec('ansible') != None)"
187191
pipdeptree --reverse -e pip,pbr,six,setuptools,toml,urllib3
188192
molecule --version
189193
molecule drivers

0 commit comments

Comments
 (0)
0