diff --git a/rstudio-server/tasks/main.yml b/rstudio-server/tasks/main.yml index 683f7586..e62250b9 100644 --- a/rstudio-server/tasks/main.yml +++ b/rstudio-server/tasks/main.yml @@ -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