Commit c8a296a9 by 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
acl:
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
with_items:
- /etc/jupyterhub
- /etc/jupyter/templates
- name: make sure dedicated rw-dirs exist
file: path={{ item }} state=directory owner=jupyterhub mode=0755
with_items:
- /var/log/jupyterhub
- name: install custom config file
template:
src: jupyterhub_config.py.j2
dest: /etc/jupyter/jupyterhub_config.py
notify: restart jupyterhub
- name: systemd script is in place
template:
src: jupyterhub.service.j2
dest: /etc/systemd/system/jupyterhub.service
notify:
- 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 @@ After=network.target
[Service]
WorkingDirectory=/opt/jupyterhub/
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/jupyterhub_config.py
User=jupyterhub
[Install]
......
# {{ ansible_managed }}
# Configuration file for jupyterhub.
## Avoid listening on iternet (we have a nginx for that)
c.JupyterHub.ip = '127.0.0.1'
## 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