Add ensure-python role
ensure-python allows for installation of a specific version of the python interpreter and development files. Add this role to tox pre.yaml. Change-Id: Ia56cba58c87aa48de3e8e3f3d28f6252f7dcd7c3
This commit is contained in:
parent
055b96d5d7
commit
42cf8e680a
@ -1,3 +1,4 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- ensure-tox
|
||||
- ensure-python
|
||||
|
10
roles/ensure-python/README.rst
Normal file
10
roles/ensure-python/README.rst
Normal file
@ -0,0 +1,10 @@
|
||||
Ensure specified python interpreter and development files are installed
|
||||
|
||||
.. note:: This role is only available for Debian based platforms
|
||||
currently.
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: python_version
|
||||
|
||||
Optional version of python interpreter to install, such as ``3.7``.
|
6
roles/ensure-python/tasks/main.yaml
Normal file
6
roles/ensure-python/tasks/main.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Install specified version of python interpreter and development files
|
||||
when: python_version is defined
|
||||
package:
|
||||
name: python{{ python_version }}-dev
|
||||
state: present
|
||||
become: yes
|
Loading…
Reference in New Issue
Block a user