From 781deea8525a0b5f98391d206c17ec1a7f882dd1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 9 Jul 2021 16:54:48 +0200 Subject: [PATCH] Rprofile.site changes from 14.04 to 18.04 --- tasks/r-packages-install.yml | 2 +- templates/Rprofile.site.j2 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/r-packages-install.yml b/tasks/r-packages-install.yml index 83d8962..06094a5 100644 --- a/tasks/r-packages-install.yml +++ b/tasks/r-packages-install.yml @@ -7,7 +7,7 @@ owner: root group: root mode: 0444 - tags: [ 'r_software', 'r_profile', 'r_pkg' ] + tags: [ 'r_software', 'r_profile', 'r_profile_site', 'r_pkg' ] - name: Configure the JDK environment shell: export JAVA_HOME={{ jdk_java_home }} ; export J2SDKDIR={{ jdk_java_home }} ; export J2REDIR={{ jdk_java_home }}/jre ; R CMD javareconf ; touch /etc/R/.java{{ jdk_default }}.env_conf diff --git a/templates/Rprofile.site.j2 b/templates/Rprofile.site.j2 index b2124d0..ddc68c5 100644 --- a/templates/Rprofile.site.j2 +++ b/templates/Rprofile.site.j2 @@ -12,6 +12,7 @@ local({r <- getOption("repos") options(repos=r) }) +{% if ansible_distribution_version is version_compare('14.04', '==') %} # Explicitly set the R encoding using the system one, if it exists if (file.exists("/etc/default/locale")) { readRenviron("/etc/default/locale") @@ -19,4 +20,4 @@ if (file.exists("/etc/default/locale")) { if(nchar(LANG)) Sys.setlocale("LC_ALL", LANG) } - +{% endif %}