zuul-jobs/test-playbooks/ensure-python-pyenv-python-version.yaml
Clark Boylan 8d4f01b74a Cleanup remaining Ansible lint warnings
Make it easier for people to see lint errors by cleaning up the
remaining lint warnings.

Change-Id: I2b614b19f5dccd1aa2ad568ff31acabc9b87c383
2024-09-18 16:46:00 -07:00

19 lines
566 B
YAML

- hosts: all
tasks:
- name: Create a python-version file with a python version in it
delegate_to: localhost
copy:
content: "3.11"
dest: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/.python-version"
- name: Include ensure-python role
include_role:
name: ensure-python
vars:
python_use_pyenv: true
- name: Check installed version of Python
command: /usr/local/bin/python3 --version
register: _check_version
failed_when: "'Python 3.11' not in _check_version.stdout"