-
Notifications
You must be signed in to change notification settings - Fork 0
/
hub_systemd.yml
31 lines (29 loc) · 1.06 KB
/
hub_systemd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- name: Set up systemd config for jupyterhub
block:
- copy:
dest: /etc/jupyterhub/jupyterhub.service
owner: jupyterhub
group: jupyterhub
content: |
[Unit]
Description=Jupyterhub
After=network-online.target
[Service]
Environment="PATH=/opt/conda/envs/jupyterhub/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="PYTHONPATH=/etc/jupyterhub"
User=jupyterhub
ExecStart=/opt/conda/envs/jupyterhub/bin/jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
WorkingDirectory=/etc/jupyterhub
# Requires a recent systemd version
#StandardOutput=file:/var/log/jupyterhub.log
#StandardError=file:/var/log/jupyterhub_err.log
[Install]
WantedBy=multi-user.target
- file:
src: /etc/jupyterhub/jupyterhub.service
path: /etc/systemd/system/jupyterhub.service
state: link
- systemd:
name: jupyterhub
enabled: yes
state: started