Skip to content

Enforce python3 use for Ansible

Grant Young requested to merge gy-python-package-fix into master

Closes https://gitlab.com/gitlab-org/quality/gitlab-environment-toolkit/-/issues/41

MR should fix the above issue where we were seeing pip packages not install correctly on first runs. Looks like it's due to the classic dual python issue of having both 2 and 3 installed.

With Python 2 deprecated we shouldn't be using it anyways but Ansible will actually still default to it at this time if it's present on the machine (which it is in our case as it comes installed by default in Ubuntu still). MR changes Ansible's detection to it's new default that will be coming soon that makes it use python 3 over 2.

MR removes the python 2 pip package from being installed and instructs Ansible to automatically not use legacy python, that in turn should solve this issue.

Edited by Grant Young

Merge request reports