2016-07-21 14:58:46 +02:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: Remove the installed R connector before upgrading
|
|
|
|
file: dest={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/r-connector'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/r-connector.war'
|
|
|
|
when: smartgears_upgrade or not r_connector_install
|
|
|
|
|
|
|
|
- name: Get the R connector war file
|
2016-07-21 17:14:13 +02:00
|
|
|
get_url: url={{ r_connector_url }} dest={{ smartgears_instance_path }}/webapps/{{ r_connector_war_file }}
|
2016-07-21 14:58:46 +02:00
|
|
|
|
|
|
|
- name: Unpack the R connector war file
|
2016-07-21 17:14:13 +02:00
|
|
|
shell: mkdir {{ smartgears_instance_path }}/webapps/r-connector ; cd {{ smartgears_instance_path }}/webapps/r-connector ; jar xf {{ smartgears_instance_path }}/webapps/{{ r_connector_war_file }}
|
2016-07-21 14:58:46 +02:00
|
|
|
args:
|
|
|
|
creates: '{{ smartgears_instance_path }}/webapps/r-connector/WEB-INF/web.xml'
|
|
|
|
|
|
|
|
- name: Obtain the permission to read the Rstudio secure cookie key
|
2016-07-21 17:14:13 +02:00
|
|
|
become: False
|
2016-07-21 14:58:46 +02:00
|
|
|
file: dest={{ r_connector_rstudio_cookie_key }} mode=640 group={{ smartgears_user }}
|
|
|
|
|
|
|
|
- name: Install the R connector web.xml template
|
|
|
|
template: src=r-web.xml.j2 dest={{ smartgears_instance_path }}/webapps/r-connector/WEB-INF/web.xml mode=0440
|
|
|
|
notify: Restart smartgears
|
|
|
|
|
2016-07-21 17:14:13 +02:00
|
|
|
- name: Install the R add users script
|
|
|
|
become: False
|
|
|
|
template: src=rusersadd.j2 dest={{ r_connector_adduserscript }} owner=root group=root mode=0555
|
|
|
|
|
2016-07-21 14:58:46 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: r_connector_install
|
|
|
|
tags: [ 'smartgears', 'r_connector', 'tomcat' ]
|