forked from ISTI-ansible-roles/ansible-roles
library/roles/rstudio-server/tasks/main.yml: Install the apparmor utilities and set the rstudio server binary to 'complain' from 'enforce' so that it can read the nlscd socket.
This commit is contained in:
parent
e1d61ac8c9
commit
de9a69c7c5
|
@ -3,6 +3,10 @@
|
|||
- name: Install the gdebi tool
|
||||
apt: pkg=gdebi-core state=latest update_cache=yes cache_valid_time=1800
|
||||
|
||||
- name: Install the apparmor utilities
|
||||
apt: pkg=apparmor-utils state=present update_cache=yes cache_valid_time=1800
|
||||
tags: [ 'rstudio', 'rstudio_server', 'apparmor' ]
|
||||
|
||||
- name: Download the rstudio server deb package
|
||||
# get_url: url={{ rstudio_download_url }} dest=/srv/{{ rstudio_file }}
|
||||
shell: cd /srv ; wget {{ rstudio_download_url }}
|
||||
|
@ -15,6 +19,11 @@
|
|||
command: gdebi -n -q /srv/{{ rstudio_file }}
|
||||
when: ( rstudio_download | changed )
|
||||
|
||||
- name: Change the apparmor behaviour to complain, otherwise it cannot read the nslcd socket
|
||||
shell: if [ -x /usr/sbin/apparmor_status ] ; then RETVAL=$( /usr/sbin/apparmor_status ) ; if [ $RETVAL -eq 0 ] ; then aa-complain /usr/lib/rstudio-server/bin/rserver ; fi ; fi
|
||||
when: rstudio_enabled
|
||||
tags: [ 'rstudio', 'rstudio_server', 'apparmor' ]
|
||||
|
||||
- name: Ensure that rstudio server is enabled and running
|
||||
service: name=rstudio-server state=started enabled=yes
|
||||
when: rstudio_enabled
|
||||
|
|
Loading…
Reference in New Issue