Ansible role that installs R itself, R packages (from CRAN, archived and remote repos) and associated tools.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

---
- name: Remove any R_LIBS_USER declarations in default Renviron
ansible.builtin.lineinfile:
dest: "{{ R_directory }}/{{ R_version }}/lib/R/etc/Renviron"
regexp: "^#?R_LIBS_USER"
state: absent
when: (update_R | bool) or (install_R | bool)
- name: Create directory for R_LIBS_USER in Renviron.site
ansible.builtin.file:
path: "{{ RLIBS_USER }}"
owner: "{{ ansible_env.USER }}"
group: "{{ ansible_env.USER }}"
state: directory
when: (update_R | bool) or (install_R | bool)
- name: Create directory for RENV_PATHS_ROOT in Renviron.site
ansible.builtin.file:
path: "{{ RENV_PATHS_ROOT }}"
owner: "{{ ansible_env.USER }}"
group: "{{ ansible_env.USER }}"
state: directory
when: (update_R | bool) or (install_R | bool)
- name: Configure our Renviron.site
ansible.builtin.template:
src: Renviron.site.j2
dest: "{{ R_directory }}/{{ R_version }}/lib/R/etc/Renviron.site"
mode: 0644
- name: Configure our Rprofile.site
ansible.builtin.template:
src: Rprofile.site.j2
dest: "{{ R_directory }}/{{ R_version }}/lib/R/etc/Rprofile.site"
mode: 0644