From dc817824538bc1b77e8b40868be4d6aa7d968218 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Mon, 20 Jul 2026 16:54:50 +0200 Subject: [PATCH] Add playbook dask --- playbooks/dask.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 playbooks/dask.yml diff --git a/playbooks/dask.yml b/playbooks/dask.yml new file mode 100644 index 00000000..33e61d18 --- /dev/null +++ b/playbooks/dask.yml @@ -0,0 +1,34 @@ +--- +- name: Install Dask and Dask JupyterLab extension + hosts: localhost + gather_facts: true + vars: + venv: "{{ dask_venv | default('/usr/local/jupyterhub') }}" + labextension_config: + labextension: + factory: + module: 'dask.distributed' + class: 'LocalCluster' + args: [] + kwargs: + security: "{{ dask_security | default(true, true) }}" + dashboard_address: ":0" + + tasks: + - name: Place labextension config + ansible.builtin.blockinfile: + path: /etc/dask/labextension.yml + append_newline: true + block: "{{ labextension_config | to_yaml }}" + owner: root + group: root + mode: "0644" + create: true + + - name: Install the extension + ansible.builtin.pip: + executable: uv_pip # uv_pip should be available on all SRC workspaces + name: dask-labextension + environment: + VIRTUAL_ENV: "{{ venv }}" + CC: gcc # https://github.com/astral-sh/uv/issues/6488