Do not add the opencpu ppa on bionic. Fix the java environment reconfiguration task.

This commit is contained in:
Andrea Dell'Amico 2019-04-03 17:13:00 +02:00
parent 2524709789
commit 2d7a8e16ac
1 changed files with 10 additions and 8 deletions

View File

@ -15,8 +15,7 @@
tags: [ 'r_software', 'r_pkg', 'r_pkg_hold' ]
- name: Install the R base packages.
apt: pkg={{ item }} state={{ r_packages_main_state }} force=yes update_cache=yes cache_valid_time=3600
with_items: '{{ r_base_packages_list }}'
apt: pkg={{ r_base_packages_list }} state={{ r_packages_main_state }} force=yes update_cache=yes cache_valid_time=3600
tags: [ 'r_software', 'r_pkg' ]
- name: When we install specific R deb packages, put them on hold
@ -27,8 +26,7 @@
tags: [ 'r_software', 'r_pkg', 'r_pkg_hold' ]
- name: Install the R additional modules from the deb repo
apt: pkg={{ item }} state={{ r_packages_state }} force=yes
with_items: '{{ r_plugins_packages_list | default([]) }}'
apt: pkg={{ r_plugins_packages_list | default([]) }} state={{ r_packages_state }} force=yes
when: r_plugins_from_deb
tags: [ 'r_software', 'r_pkg' ]
@ -38,18 +36,22 @@
tags: [ 'r_software', 'r_profile', 'r_pkg' ]
- name: Configure the JDK environment
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
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
args:
creates: '/etc/R/.java{{ jdk_default }}.env_conf'
when:
- jdk_java_home is defined
- jdk_default is defined
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 }}'
when: ansible_distribution_version is version_compare('18.04', '<')
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
with_items: '{{ r_distribution_required_packages | default([]) }}'
apt: pkg={{ r_distribution_required_packages | default([]) }} state={{ r_packages_state }} update_cache=yes force=yes cache_valid_time=3600
tags: [ 'r_software', 'r_pkg', 'r_deps' ]
- name: Ensure that the R packages sources directory exists