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

Extra optional step for jupyterlab autostart

parent f3036c30
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,9 @@ The configurable options are the following:
| Variable name | Default value | Description |
|:----------------------|:--------------|:------------|
| target_user | pi | Setup for a specified user |
| jupyter_service | true | Setup a systemd service to autostart jupyterlab in the background |
| jupyter_service | true | Setup a systemd service for running in the background |
| jupyter_start | true | Don't start jupyterlab directly |
| jupyter_autostart | true | Set the jupyterlab service to autostart |
| ignore_python_version | false | Ignore the python version check (**not recommended**) |
| ignore_architecture | false | Ignore the architecture check (**not recommended**) |
......
......@@ -2,9 +2,10 @@
- hosts: localhost
vars:
target_user: pi
jupyter_service: true
ignore_python_version: false
ignore_architecture: false
jupyter_service: true
jupyter_autostart: true
jupyter_start: true
pre_tasks:
......
......@@ -25,11 +25,18 @@
mode: '0644'
when: jupyter_service
- name: Make systemd service autostart
become: true
file:
src: /etc/systemd/system/jupyter.service
dest: /etc/systemd/system/multi-user.target.wants/jupyter.service
state: link
when: jupyter_service and jupyter_autostart
- name: Start Jupyter-Lab service
become: true
systemd:
name: jupyter
state: started
enabled: true
daemon_reload: true
when: jupyter_service and jupyter_start
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment