Izveden refactor iz taskov v role
This commit is contained in:
parent
747438dedf
commit
a35460a57b
317 changed files with 2761 additions and 50 deletions
4
roles/rstudio/tasks/main.yml
Normal file
4
roles/rstudio/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- import_tasks: main_win.yml
|
||||
when: ansible_connection == 'winrm'
|
||||
- import_tasks: main_lin.yml
|
||||
when: ansible_connection == 'ssh'
|
14
roles/rstudio/tasks/main_lin.yml
Normal file
14
roles/rstudio/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: Add R repository
|
||||
block:
|
||||
- name: R repo - apt key
|
||||
ansible.builtin.get_url:
|
||||
url: https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc
|
||||
dest: /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
|
||||
- name: R repo - url
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb https://cloud.r-project.org/bin/linux/ubuntu {{ansible_distribution_release}}-cran40/"
|
||||
state: present
|
||||
- name: Install R
|
||||
ansible.builtin.apt:
|
||||
name: r-base
|
||||
state: latest
|
85
roles/rstudio/tasks/main_win.yml
Normal file
85
roles/rstudio/tasks/main_win.yml
Normal file
|
@ -0,0 +1,85 @@
|
|||
- name: Install R
|
||||
win_chocolatey:
|
||||
name: r.project
|
||||
package_params: /AddToPath
|
||||
|
||||
- name: Find R directory
|
||||
win_find:
|
||||
paths: C:\Program Files\R
|
||||
patterns: ['R-*']
|
||||
file_type: directory
|
||||
register: base
|
||||
|
||||
- name: Add R to path
|
||||
win_path:
|
||||
elements:
|
||||
- "{{ base.files[0].path }}\\bin"
|
||||
|
||||
- name: Find installed R libraries
|
||||
win_find:
|
||||
paths: "{{ base.files[0].path }}\\library"
|
||||
file_type: directory
|
||||
register: libs
|
||||
|
||||
- name: Install R packages
|
||||
win_command: Rscript -
|
||||
args:
|
||||
stdin: install.packages(c("{{ item }}"), repos = "http://cran.rstudio.com")
|
||||
when: item not in (libs.files|map(attribute='filename'))
|
||||
loop:
|
||||
- CORElearn
|
||||
- DEoptim
|
||||
- DEoptimR
|
||||
- GenSA
|
||||
- MASS
|
||||
- NMF
|
||||
- RSNNS
|
||||
- Radviz
|
||||
- adabag
|
||||
- aplpack
|
||||
- arules
|
||||
- arulesViz
|
||||
- bnlearn
|
||||
- caret
|
||||
- class
|
||||
- cluster
|
||||
- e1071
|
||||
- graphics
|
||||
- igraph
|
||||
- ipred
|
||||
- keras
|
||||
- kernlab
|
||||
- kknn
|
||||
- lattice
|
||||
- lpSolveAPI
|
||||
- metaheuristicOpt
|
||||
- neuralnet
|
||||
- nnet
|
||||
- quadprog
|
||||
- randomForest
|
||||
- reshape2
|
||||
- rpart
|
||||
- rpart.plot
|
||||
- smotefamily
|
||||
- tabuSearch
|
||||
- tidyverse
|
||||
- viridisLite
|
||||
|
||||
- name: Install RStudio
|
||||
win_chocolatey:
|
||||
name: r.studio
|
||||
|
||||
- name: Create configuration directory
|
||||
win_file:
|
||||
path: "%PROGRAMDATA%\\RStudio"
|
||||
state: directory
|
||||
|
||||
- name: Disable crash reporting
|
||||
win_copy:
|
||||
dest: "%PROGRAMDATA%\\RStudio\\crash-handler.conf"
|
||||
content: crash-handling-enabled=0
|
||||
|
||||
- name: Disable update notifications
|
||||
win_copy:
|
||||
dest: "%PROGRAMDATA%\\RStudio\\rstudio-prefs.json"
|
||||
content: { "check_for_updates": false }
|
Loading…
Add table
Add a link
Reference in a new issue