From c79bacd579a610d094cb4de18b5c50f8c859d32c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 3 Oct 2018 18:46:43 +0200 Subject: [PATCH] Run the java R configure command as root. --- smartgears/dataminer_app/tasks/dataminer-app.yml | 10 +++++++--- smartgears/r_connector/tasks/main.yml | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/smartgears/dataminer_app/tasks/dataminer-app.yml b/smartgears/dataminer_app/tasks/dataminer-app.yml index d837652..5cc12a3 100644 --- a/smartgears/dataminer_app/tasks/dataminer-app.yml +++ b/smartgears/dataminer_app/tasks/dataminer-app.yml @@ -33,9 +33,6 @@ shell: /usr/local/bin/wps-config-fixer # notify: Restart smartgears - - name: Reconfigure the Java environment for R - shell: R CMD javareconf - - name: Remove the file that lists the installed algorithms, after an upgrade file: dest={{ smartgears_user_home }}/wps_algorithms_install_log/already_installed_algorithms.txt state=absent register: reinstall_algorithms @@ -51,3 +48,10 @@ become_user: '{{ smartgears_user }}' tags: [ 'tomcat', 'dataminer', 'wps' ] +- block: + - name: Reconfigure the Java environment for R + shell: R CMD javareconf + + become: True + become_user: root + tags: [ 'tomcat', 'dataminer', 'wps' ] diff --git a/smartgears/r_connector/tasks/main.yml b/smartgears/r_connector/tasks/main.yml index 63e21ea..6e4b7e4 100644 --- a/smartgears/r_connector/tasks/main.yml +++ b/smartgears/r_connector/tasks/main.yml @@ -80,6 +80,15 @@ when: r_connector_install tags: [ 'smartgears', 'r_connector', 'tomcat' ] +- block: + - name: Reconfigure the Java environment for R + shell: R CMD javareconf + + become: True + become_user: root + when: r_connector_install + tags: [ 'smartgears', 'r_connector', 'tomcat' ] + - block: - name: Install the packages required to enable the LDAP PAM authentication apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800