ansible-roles/smartgears/r_connector/tasks/main.yml

35 lines
1.5 KiB
YAML
Raw Normal View History

---
- 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
get_url: url={{ r_connector_url }} dest={{ smartgears_instance_path }}/webapps/{{ r_connector_war_file }}
- name: Unpack the R connector war file
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 }}
args:
creates: '{{ smartgears_instance_path }}/webapps/r-connector/WEB-INF/web.xml'
- name: Obtain the permission to read the Rstudio secure cookie key
become: False
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
- name: Install the R add users script
become: False
template: src=rusersadd.j2 dest={{ r_connector_adduserscript }} owner=root group=root mode=0555
become: True
become_user: '{{ smartgears_user }}'
when: r_connector_install
tags: [ 'smartgears', 'r_connector', 'tomcat' ]