The main repository was missing.

This commit is contained in:
Andrea Dell'Amico 2021-07-02 16:30:02 +02:00
parent 23f78b67a0
commit 74ba024bd5
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 21 additions and 1 deletions

View File

@ -11,6 +11,9 @@
#
# Set to True if you want install from the CRAN deb repository
r_install_cran_repo: False
# This si the CRAN main repository, that contains the r-base-* packages
r_cran_ubuntu_repo_key: 'E298A3A825C0D65DFD57CBB651716619E084DAB9'
r_cran_ubuntu_repo: 'deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/'
# Use 'marutter/c2d4u3.5' for R 3.6
r_cran_ubuntu_packages_ppa_trusty: 'ppa:marutter/c2d4u'
# 4.1, Ubuntu 18.04+

View File

@ -19,6 +19,17 @@
tags: [ 'r_software', 'r_repo' ]
- block:
- name: Install the CRAN main R repository key
apt_key:
keyserver: 'keyserver.ubuntu.com'
id: '{{ r_cran_ubuntu_repo_key }}'
- name: Install the CRAN main R repository
apt_repository:
repo: '{{ r_cran_ubuntu_repo }}'
state: present
update_cache: yes
- name: Add the CRAN repository (Ubuntu Bionic PPA)
apt_repository:
repo: '{{ r_cran_ubuntu_packages_ppa }}'
@ -38,12 +49,18 @@
tags: [ 'r_software', 'r_repo' ]
- block:
- name: Remove the CRAN repository
- name: Remove the CRAN repositores
apt_repository:
repo: '{{ r_cran_ubuntu_packages_ppa }}'
state: absent
update_cache: yes
- name: Remove the CRAN main repository
apt_repository:
repo: '{{ r_cran_ubuntu_repo }}'
state: absent
update_cache: yes
when: not r_install_cran_repo
tags: [ 'r_software', 'r_repo' ]