-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_shiny_server.yml
50 lines (44 loc) · 1.4 KB
/
install_shiny_server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
- name: Install and Configure Shiny Server
hosts: aws_ec2
become: true
vars_files:
- vars/config_vars.yml
tasks:
- name: Make sure system dependencies are installed
apt:
name:
- libcairo2-dev
- libxt-dev
- libharfbuzz-dev
- git
- cmake
- pandoc
- pandoc-citeproc
state: present
- name: Define R package dependencies
set_fact:
shiny_dependencies: "c('later', 'fs', 'Rcpp', 'httpuv', 'mime',
'jsonlite', 'digest', 'htmltools',
'xtable', 'R6', 'Cairo', 'sourcetools', 'shiny', 'rmarkdown')"
- name: Install R package dependencies
become_flags: 'su - -c'
shell: "R -e \"install.packages({{ shiny_dependencies }}
[!({{ shiny_dependencies }} %in% installed.packages())],
repos=c('https://packagemanager.rstudio.com/all/__linux__/{{ ansible_distribution_release }}/latest',
'https://cran.rstudio.com/'),
lib='/usr/lib/R/site-library')\""
register: r_install
changed_when: r_install.stderr != ""
- name: Install Shiny server
include_role:
name: install_shiny_server
apply:
tags: shiny_server
tags: shiny_server
- name: Congifure Shiny server
include_role:
name: configure_shiny_server
apply:
tags: configure_shiny
tags: configure_shiny