Skip to content
Snippets Groups Projects
Commit 0c31b394 authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Check python version + service opt-out

- Python version check is set to allow 3.7.x - 3.9.x
- The version check can be disabled with the `ignore_python_version` variable
- The systemd service can be opt-out with `jupyter_service` variable
parent a1a5b28b
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,15 @@
- hosts: localhost
vars:
target_user: pi
jupyter_service: true
ignore_python_version: false
pre_tasks:
- name: Check python version
fail:
msg: Python version is not supported. Set ignore_python_version to true to ignore this.
when: (not ignore_python_version) and not (ansible_python_version is version('3.7.0', '>=') and ansible_python_version is version('3.10.0', '<'))
# - name: Upgrade packages
# become: true
# apt:
......
......@@ -32,7 +32,8 @@
src: files/jupyter.service
dest: /etc/systemd/system/jupyter.service
mode: '0644'
when: jupyter_service
- name: Start Jupyter-Lab service
become: true
systemd:
......@@ -40,4 +41,5 @@
state: started
enabled: true
daemon_reload: true
when: jupyter_service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment