homeassistant: Install newer python version if required
This commit is contained in:
parent
389331e59a
commit
b629b62974
3
roles/homeassistant/defaults/main.yml
Normal file
3
roles/homeassistant/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
ha_python_version: '3.12'
|
@ -1 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Install python if required
|
||||||
|
ansible.builtin.include_tasks: python_312.yml
|
||||||
|
when: ha_python_version == '3.12'
|
||||||
|
26
roles/homeassistant/tasks/python_312.yml
Normal file
26
roles/homeassistant/tasks/python_312.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Python 3.12 | add GPG signing key
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt_key:
|
||||||
|
url: "https://pascalroeleven.nl/deb-pascalroeleven.gpg"
|
||||||
|
state: present
|
||||||
|
validate_certs: true
|
||||||
|
tags: install
|
||||||
|
|
||||||
|
- name: Python 3.12 | add official repository
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt_repository:
|
||||||
|
repo: "deb http://deb.pascalroeleven.nl/python3.12 bookworm-backports main"
|
||||||
|
state: present
|
||||||
|
filename: python312
|
||||||
|
update_cache: true
|
||||||
|
tags: install
|
||||||
|
|
||||||
|
- name: Python 3.12 | establish dependencies
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ python312_dependencies }}"
|
||||||
|
tags: install
|
6
roles/homeassistant/vars/main.yml
Normal file
6
roles/homeassistant/vars/main.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
python312_dependencies:
|
||||||
|
- python3.12
|
||||||
|
- python3.12-venv
|
||||||
|
- python3.12-dev
|
Loading…
x
Reference in New Issue
Block a user