Commit c8a296a9 authored by Jocelyn Delalande's avatar Jocelyn Delalande

jupyterhub: Turn into a functional role !

parent f31e8630
- name: restart jupyterhub
service: name=jupyterhub state=restarted
- name: reload systemd
command: systemctl daemon-reload
\ No newline at end of file
......@@ -47,13 +47,36 @@
entry: "user:jupyterhub:r"
state: present
- name: authorize jupyterhub to log events in lastlog
path: /var/log/lastlog
entry: "user:jupyterhub:rw"
state: present
- name: make sure dedicated ro-dirs exist
file: path={{item}}/ state=directory owner=root mode=0755
- /etc/jupyterhub
- /etc/jupyter/templates
- name: make sure dedicated rw-dirs exist
file: path={{ item }} state=directory owner=jupyterhub mode=0755
- /var/log/jupyterhub
- name: install custom config file
dest: /etc/jupyter/
notify: restart jupyterhub
- name: systemd script is in place
src: jupyterhub.service.j2
dest: /etc/systemd/system/jupyterhub.service
- restart jupyterhub
- reload systemd
- restart jupyterhub
- name: jupyterhub is started
service: name=jupyterhub state=started
\ No newline at end of file
......@@ -4,7 +4,7 @@
ExecStart=/opt/jupyterhub/venv/bin/jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner
ExecStart=/opt/jupyterhub/venv/bin/jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner -f /etc/jupyterhub/
# {{ ansible_managed }}
# Configuration file for jupyterhub.
## Avoid listening on iternet (we have a nginx for that)
c.JupyterHub.ip = ''
## Use our in-venv sudospawner
c.SudoSpawner.sudospawner_path = '/opt/jupyterhub/venv/bin/sudospawner'
## Restrict users able to log in to a unix group
c.PAMAuthenticator.group_whitelist = ['jupyterhub-users']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment