From 98fab038498f494a8c57b7580b0938e94abef457 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 21 Nov 2018 16:42:52 +0100 Subject: [PATCH] rstudio/dataminer: new playbook that installs deb and R packages. --- R/defaults/main.yml | 3 +++ R/tasks/r-installation.yml | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/R/defaults/main.yml b/R/defaults/main.yml index 3a84881..dbcd237 100644 --- a/R/defaults/main.yml +++ b/R/defaults/main.yml @@ -78,6 +78,9 @@ r_plugins_packages_list: - r-cran-spatial - r-cran-survival +r_apt_additional_repos: + - 'ppa:opencpu/jq' + # r_plugins_list_to_install: # - { name: 'R2WinBUGS', repo: '{{ r_cran_mirror_site }}' } # - { name: 'R2jags', repo: '{{ r_cran_mirror_site }}' } diff --git a/R/tasks/r-installation.yml b/R/tasks/r-installation.yml index eee9c48..6a97cee 100644 --- a/R/tasks/r-installation.yml +++ b/R/tasks/r-installation.yml @@ -38,9 +38,14 @@ tags: [ 'r_software', 'r_profile', 'r_pkg' ] - name: Configure the JDK environment - command: R CMD javareconf + shell: export JAVA_HOME=/usr/lib/jvm/java-8-oracle ; export J2SDKDIR=/usr/lib/jvm/java-8-oracle ; export J2REDIR=/usr/lib/jvm/java-8-oracle/jre ; R CMD javareconf ignore_errors: True tags: [ 'r_software', 'r_profile', 'r_pkg', 'r_java' ] + +- name: Install some additional repositories. They provide dependencies for some R packages + apt_repository: repo={{ item }} state=present update_cache=yes + with_items: '{{ r_apt_additional_repos }}' + tags: [ 'r_software', 'r_apt_repo', 'r_deps' ] - name: Install some packages needed by R packages when installed from source apt: pkg={{ item }} state={{ r_packages_state }} update_cache=yes force=yes cache_valid_time=3600