debops.rstudio_server default variables

Application sources

rstudio_server__rstudio_in_apt

Variable which contains the information about presence of the rstudio-server package in APT. If not, the .deb package containing RStudio Server will be downloaded by the role and installed directly.

rstudio_server__rstudio_in_apt: '{{ True
                                    if (rstudio_server__register_package_rstudio.stdout)
                                    else False }}'
rstudio_server__src

Directory where downloaded packages will be stored.

rstudio_server__src: '{{ (ansible_local.fhs.src | d("/usr/local/src"))
                         + "/" + rstudio_server__user }}'
rstudio_server__release_deb_map

The map of the RStudio releases matched to supported OS distributions and releases.

rstudio_server__release_deb_map:
  'Ubuntu':
    package:  'https://download2.rstudio.org/server/trusty/amd64/rstudio-server-1.2.1335-amd64.deb'
    checksum: 'sha256:a41f16fd7e7e471fca77f081a4b302a1d66d14fb32dffcea1299e0c1dbf30e44'
  'Debian_jessie':
    package:  'https://download2.rstudio.org/server/trusty/amd64/rstudio-server-1.2.1335-amd64.deb'
    checksum: 'sha256:a41f16fd7e7e471fca77f081a4b302a1d66d14fb32dffcea1299e0c1dbf30e44'
  'Debian':
    package: 'https://download2.rstudio.org/server/debian9/x86_64/rstudio-server-1.2.1335-amd64.deb'
    checksum: 'sha256:a95d0b33d1f7d85fbd7403a610aa39b3bb8354e7efdba3e80f4d919d1589ca95'
rstudio_server__rstudio_deb_url

The URL of the rstudio-server .deb package to download.

rstudio_server__rstudio_deb_url: '{{ rstudio_server__release_deb_map[ansible_distribution + "_" + ansible_distribution_release].package
                                     if (rstudio_server__release_deb_map[ansible_distribution + "_" + ansible_distribution_release]|d())
                                     else rstudio_server__release_deb_map[ansible_distribution].package }}'
rstudio_server__rstudio_deb_checksum

The SHA256 checksum of the rstudio-server .deb package.

rstudio_server__rstudio_deb_checksum: '{{ rstudio_server__release_deb_map[ansible_distribution + "_" + ansible_distribution_release].checksum
                                          if (rstudio_server__release_deb_map[ansible_distribution + "_" + ansible_distribution_release]|d())
                                          else rstudio_server__release_deb_map[ansible_distribution].checksum }}'
rstudio_server__signing_key_id

The fingerprint of the GPG key used by RStudio Inc. to sign the released .deb packages, used for verification of the package before installation. See https://www.rstudio.com/code-signing/ for more details.

rstudio_server__signing_key_id: 'FE85 64CF F1AB 93F1 7286  4519 3F32 EE77 E331 692F'

APT packages

rstudio_server__base_packages

List of APT packages required by RStudio Server.

rstudio_server__base_packages:
  - 'dpkg-sig'
  - '{{ "rstudio-server"
        if rstudio_server__rstudio_in_apt|bool
        else [] }}'
rstudio_server__packages

List of additional APT packages to install with RStudio Server.

rstudio_server__packages: []

RStudio system account

rstudio_server__user

The UNIX system account used by RStudio Server.

rstudio_server__user: 'rstudio-server'
rstudio_server__group

The UNIX system group used by RStudio Server.

rstudio_server__group: 'rstudio-server'
rstudio_server__home

RStudio Server home directory.

rstudio_server__home: '{{ (ansible_local.fhs.home | d("/var/local"))
                          + "/" + rstudio_server__user }}'
rstudio_server__shell

The UNIX shell used by the RStudio user account.

rstudio_server__shell: '/usr/sbin/nologin'
rstudio_server__comment

The comment/GECOS field of the RStudio Server account.

rstudio_server__comment: 'RStudio Server'

User account access

These variables can be used to grant access to the RStudio Server service to specific UNIX accounts. Only existing accounts will be added to the authentication group. See rstudio_server__allow_users for more details.

rstudio_server__allow_users

Specify list of UNIX user accounts that will be allowed to access RStudio Server on all hosts in the Ansible inventory.

rstudio_server__allow_users: []
rstudio_server__group_allow_users

Specify list of UNIX user accounts that will be allowed to access RStudio Server on hosts in a specific Ansible inventory group.

rstudio_server__group_allow_users: []
rstudio_server__host_allow_users

Specify list of UNIX user accounts that will be allowed to access RStudio Server on specific hosts in the Ansible inventory.

rstudio_server__host_allow_users: []

RStudio Server options

rstudio_server__bind

IP address of the interface on which rstudio-server listens for connections.

rstudio_server__bind: '127.0.0.1'
rstudio_server__port

The TCP port used by RServer Studio service.

rstudio_server__port: '8787'
rstudio_server__auth_group

The UNIX system group which allows access to RStudio Server.

rstudio_server__auth_group: 'rstudio-users'
rstudio_server__session_timeout

RStudio session timeout in minutes. When it passes, idle sessions will be saved on disk and disabled.

rstudio_server__session_timeout: '120'
rstudio_server__cran_mirror

The URL of the Comprehensive R Archive Network mirror which should be used by RStudio Server.

rstudio_server__cran_mirror: '{{ ansible_local.cran.mirror|d("https://cloud.r-project.org/") }}'

RStudio Server configuration files

These variables define the contents of the RStudio Server configuration files. See rstudio_server__*_conf for more details.

rstudio_server__rserver_conf

The contents of the /etc/rstudio/rserver.conf configuration file.

rstudio_server__rserver_conf:

  - 'www-address':              '{{ rstudio_server__bind }}'
  - 'www-port':                 '{{ rstudio_server__port }}'
  - 'auth-required-user-group': '{{ rstudio_server__auth_group }}'
rstudio_server__rsession_conf

The contents of the /etc/rstudio/rsession.conf configuration file.

rstudio_server__rsession_conf:

  - 'session-timeout-minutes': '{{ rstudio_server__session_timeout }}'
  - 'r-cran-repos':            '{{ rstudio_server__cran_mirror }}'

Webserver configuration

rstudio_server__fqdn

The Fully Qualified Domain Name of the RStudio Server web service.

rstudio_server__fqdn: 'rstudio.{{ rstudio_server__domain }}'
rstudio_server__domain

The DNS domain on which RStudio Server will be available.

rstudio_server__domain: '{{ ansible_domain }}'
rstudio_server__upload_size

Maximum upload size allowed by the webserver, in megabytes.

rstudio_server__upload_size: '50m'

Configuration for other Ansible roles

rstudio_server__etc_services__dependent_list

Configuration for the debops.etc_services Ansible role.

rstudio_server__etc_services__dependent_list:

  - name: 'rstudio'
    port: '{{ rstudio_server__port }}'
    comment: 'RStudio Server'
rstudio_server__keyring__dependent_gpg_keys

Configuration for the debops.keyring Ansible role.

rstudio_server__keyring__dependent_gpg_keys:

  - user: '{{ rstudio_server__user }}'
    group: '{{ rstudio_server__group }}'
    home: '{{ rstudio_server__home }}'
    id: '{{ rstudio_server__signing_key_id }}'
rstudio_server__cran__dependent_packages

Configuration for the debops.cran Ansible role.

rstudio_server__cran__dependent_packages:

  - 'r-doc-html'
rstudio_server__nginx__dependent_servers

Configuration for the debops.nginx Ansible role.

rstudio_server__nginx__dependent_servers:

  - by_role: 'debops.rstudio_server'
    name: '{{ rstudio_server__fqdn }}'
    filename: 'debops.rstudio_server'

    options: |
        client_max_body_size {{ rstudio_server__upload_size }};

    location_list:
      - pattern: '/'
        options: |
          proxy_pass http://127.0.0.1:{{ rstudio_server__port }};
          proxy_redirect http://127.0.0.1:{{ rstudio_server__port }}/ $scheme://$host/;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection $connection_upgrade;
          proxy_read_timeout 20d;
        state: 'present'