2021-03-08 01:57:10 +00:00
|
|
|
- name: Make the directories to hold notebooks
|
|
|
|
file:
|
|
|
|
state: directory
|
2021-03-09 04:57:33 +00:00
|
|
|
path: '{{ item }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ notebook_dir }}/etc/jupyter'
|
|
|
|
- '{{ notebook_dir }}/etc/jupyterhub'
|
|
|
|
- '{{ notebook_dir }}/etc/systemd'
|
2021-03-08 01:57:10 +00:00
|
|
|
|
|
|
|
- name: Use pip to install into a virtual environment
|
|
|
|
pip:
|
|
|
|
name:
|
2021-03-09 04:57:33 +00:00
|
|
|
- pip
|
2021-03-08 01:57:10 +00:00
|
|
|
virtualenv: "{{ jupyter_venv }}" # /opt/iiab/jupyter
|
|
|
|
virtualenv_site_packages: no
|
|
|
|
virtualenv_command: /usr/bin/virtualenv
|
|
|
|
virtualenv_python: python3
|
|
|
|
extra_args: "--no-cache-dir"
|
|
|
|
when: internet_available
|
|
|
|
|
2021-03-09 04:57:33 +00:00
|
|
|
- name: Fetch the Littlest JupyterHub code
|
|
|
|
ansible.builtin.git:
|
|
|
|
repo: '{{ jupyterhub_url }}
|
|
|
|
dest: '{{ jupyter_venv }}'
|
|
|
|
|
|
|
|
- name: Install a bootstrap.py that permits installation on other than Ubunt
|
|
|
|
template:
|
|
|
|
src: bootstrap.py
|
|
|
|
dest: '{{ jupyter_venv }}'
|
|
|
|
|