Re: 015ba65
The community.hashi_vault
collection runs its integration tests for its lookup plugin via the default container, running against all supported versions of Python.
As part of the set up for the integration tests, the package
module is used to install the unzip
and tinyproxy
packages:
This had already been failing when the collection was created except when the --python
option on ansible-test
happened to match the system version of python in the container. But the workaround you see above was used to override the interpreter for these tasks:
vars:
ansible_python_interpreter: "{{
'/usr/bin/python3' if ansible_distribution in ['Ubuntu', 'Debian'] else ansible_python.executable
}}"
That had been working up until the recent change to default to python 3.9.
The error message returned is similar to what would be expected when using the wrong python version: a warning about it trying to install python3-apt
and then an error message when that failed:
python3-apt must be installed and visible from /usr/bin/python3`
Things I tried:
- Setting
ansible_python_interpreter
to python3.6
or to /usr/bin/python3.6
:
- to my surprise, it didn't work. Error updated to
python3-apt must be installed and visible from /usr/bin/python3.6
- Updating
runme.sh
to reset the symlink, via: ln -s python3.6 /usr/bin/python3 -f
- this did work, of course modifying the environment meant the test run failed in the end, but it seems something is really tied to
/usr/bin/python3
being 3.6.
For now I think I'm going to pin to ansible-test-container:3.2.2
so that my CI is working, but it's not really a long term solution.
Something doesn't seem to be working properly when explicitly overriding the python interpreter, but I can't fully tell where it is. If I should be submitting this elsewhere, please let me know.