Skip to content

Commit

Permalink
Move package installs into variable
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Oct 17, 2024
1 parent c440627 commit 542d87b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
11 changes: 11 additions & 0 deletions ansible/roles/oonidata/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ admin_group_name: admin
enable_oonipipeline_worker: true
enable_oonidata_proxy: false
enable_jupyterhub: true
conda_forge_packages:
- seaborn
- dask
conda_packages:
- pandas
- numpy
- altair
- bokeh
pip_packages:
- "-e 'git+https://github.com/ooni/data#egg=oonipipeline&subdirectory=oonipipeline'"
- "clickhouse-driver"
28 changes: 17 additions & 11 deletions ansible/roles/oonidata/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,33 @@
tags:
- oonidata
- oonipipeline
- packages

- name: Install OONI pipeline from pip
- name: "install conda packages"
ansible.builtin.shell:
cmd: "{{ miniconda_install_dir }}/bin/pip install -e 'git+https://github.com/ooni/data#egg=oonipipeline&subdirectory=oonipipeline'"
cmd: "{{ miniconda_install_dir }}/bin/conda install -y {{ item }}"
loop: "{{ conda_packages }}"
tags:
- oonidata
- oonipipeline
- packages

- name: "install conda packages"
- name: Install conda-forge packages
ansible.builtin.shell:
cmd: "{{ miniconda_install_dir }}/bin/conda install -y {{ item }}"
loop:
- pandas
- numpy
- altair
cmd: "{{ miniconda_install_dir }}/bin/conda install -c conda-forge -y {{ item }}"
loop: "{{ conda_forge_packages }}"
tags:
- oonidata
- packages

- name: "install pip packages"
- name: "Install pip packages"
ansible.builtin.shell:
cmd: "{{ miniconda_install_dir }}/bin/pip install {{ item }}"
loop:
- clickhouse-driver
loop: "{{ pip_packages }}"
tags:
- oonidata
- oonipipeline
- packages

- ansible.builtin.import_tasks: oonipipeline-worker.yml
when: enable_oonipipeline_worker
Expand Down

0 comments on commit 542d87b

Please sign in to comment.