main.yml 1.07 KB
Newer Older
Jean-Francois Rey's avatar
Jean-Francois Rey committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: Install system libraries dependencies
  become: yes
  shell: |
    curl -LO "{{ mac_sys_lib_repository }}/{{ item }}"
    sudo tar fvxz "{{ item }}" -C / 
    rm "{{ item }}"
  args:
    warn: no
  loop: "{{ mac_sys_libs }}"
  when: mac_sys_libs is defined

- name: Install BiocManager
  shell: /usr/local/bin/Rscript -e "install.packages(c('BiocManager'), repo='{{ r_cran_mirror }}', ask=FALSE)"

- name: Install Bioconductor pacakges
  shell: /usr/local/bin/Rscript -e "BiocManager::install(c('{{ item }}'))"
  loop: "{{ r_pkg_bioc }}"
  when: r_pkg_bioc is defined

- name: Install CRAN packages
  shell: /usr/local/bin/Rscript -e "install.packages(c('{{ item }}'), repo='{{ r_cran_mirror }}', ask=FALSE)"
  loop: "{{ r_pkg_cran }}"
  when: r_pkg_cran is defined

- name: Install github packages
  shell: /usr/local/bin/Rscript -e "devtools::install_github(c('{{ item }}'))"
  loop: "{{ r_pkg_github }}"
  when: r_pkg_github is defined

- name: Install local R packages
  shell: /usr/local/bin/R CMD INSTALL "{{ item }}"
  loop: "{{ r_pkg_local }}"
  when: r_pkg_local is defined