Commit 060c885a authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

add roles

parent b987bbfb
...@@ -17,16 +17,17 @@ ...@@ -17,16 +17,17 @@
- name: disable sleep - name: disable sleep
shell: shell:
cmd: sudo pmset -a disablesleep 1 cmd: sudo pmset -a disablesleep 1
- name: set time synchronization
script: files/update-time.sh - name: install R and dependencies
- name: Install R and dependencies hosts: MacOSCatalina
script: files/install-r.sh vars:
- name: Install R packages and dependencies - r_cran_mirror: https://cloud.r-project.org
script: files/install-r-library.sh - ansible_python_interpreter: "/usr/bin/python3"
- name: Install MacTex roles:
script: files/install-mactex.sh - common
- name: Install Xquartz - R
script: files/install-xquartz.sh - R-packages
- name: Install GitLab-Runner - MacTex
script: files/install-gitlabrunner.sh - Xquartz
- cicd
---
- name: Install Mactex
shell:
cmd: |
curl -LO http://mirror.ctan.org/systems/mac/mactex/MacTeX.pkg
sudo installer -package MacTex.pkg -target /
rm Mactex.pkg
mac_sys_lib_repository: "https://mac.R-project.org/libs-4"
mac_sys_libs:
- "bdb-6.2.23-darwin.17-x86_64.tar.gz"
- "boost-1.73.0-darwin.17-x86_64.tar.gz"
- "boost-headers-1.69-0-darwin.17-x86_64.tar.gz"
- "cairo-1.14.12-darwin.17-x86_64.tar.gz"
- "cairomm-1.11.2-darwin.17-x86_64.tar.gz"
- "ffi-3.3-darwin.17-x86_64.tar.gz"
- "fftw-3.3.8-darwin.17-x86_64.tar.gz"
- "fontconfig-2.13.1-darwin.17-x86_64.tar.gz"
- "freetype-2.10.0-darwin.17-x86_64.tar.gz"
- "freexl-1.0.6-darwin.17-x86_64.tar.gz"
- "gdal-3.1.1-darwin.17-x86_64.tar.gz"
- "geos-3.8.1-darwin.17-x86_64.tar.gz"
- "glpk-4.65-darwin.17-x86_64.tar.gz"
- "gmp-6.2.0-darwin.17-x86_64.tar.gz"
- "gsl-2.6-darwin.17-x86_64.tar.gz"
- "hdf5-1.12.0-darwin.17-x86_64.tar.gz"
- "icu-67.1-darwin.17-x86_64.tar.gz"
- "jpeg-9-darwin.17-x86_64.tar.gz"
- "libpng-1.6.37-darwin.17-x86_64.tar.gz"
- "libpq-9.6.9-darwin.17-x86_64.tar.gz"
- "libsndfile-1.0.28-darwin.17-x86_64.tar.gz"
- "libsodium-1.0.18-darwin.17-x86_64.tar.gz"
- "libwebp-1.1.0-darwin.17-x86_64.tar.gz"
- "mpfr-4.0.2-darwin.17-x86_64.tar.gz"
- "netcdf-4.7.4-darwin.17-x86_64.tar.gz"
- "openjpeg-2.3.1-darwin.17-x86_64.tar.gz"
- "openssl-1.1.1g-darwin.17-x86_64.tar.gz"
- "pcre2-10.34-darwin.17-x86_64.tar.gz"
- "pixman-0.38.4-darwin.17-x86_64.tar.gz"
- "pkgconfig-0.28-darwin.17-x86_64.tar.gz"
- "proj-6.3.1-darwin.17-x86_64.tar.gz"
- "protobuf-3.11.4-darwin.17-x86_64.tar.gz"
- "qpdf-9.1.1-darwin.17-x86_64.tar.gz"
- "QuantLib-1.18-darwin.17-x86_64.tar.gz"
- "readline-5.2.14-darwin.17-x86_64.tar.gz"
- "sigc++-4.2.1-darwin.17-x86_64.tar.gz"
- "sqlite3-3.32.3-darwin.17-x86_64.tar.gz"
- "szip-2.1.1-darwin.17-x86_64.tar.gz"
- "texinfo-6.7-darwin.17-x86_64.tar.gz"
- "tiff-4.1.0-darwin.17-x86_64.tar.gz"
- "udunits-2.2.24-darwin.17-x86_64.tar.gz"
- "xml2-2.9.10-darwin.17-x86_64.tar.gz"
- "xz-5.2.4-darwin.17-x86_64.tar.gz"
- "zeromq-4.3.2-darwin.17-x86_64.tar.gz"
- "zlib-system-stub.tar.gz"
r_cran_mirror: https://cloud.r-projet.org
## Bioconductor package list
r_pkg_bioc: Biostrings
## CRAN package list
r_pkg_cran:
- testthat
- pkgload
- devtools
- deSolve
- sp-rgeos
- fields
- MASS
- Matrix
- deldir
- pracma
- raster
- fftwtools
- mvtnorm
- rgdal
- sf
- splancs
- knitr
- rmarkdown
- testthat
- Rcpp
- RcppArmadillo
- RcppEigen
- fasterize
- roxygen2
- shiny
- htmltools
- shinydashboard
- ggplot2
- dplyr
- dbplyr
- DT
- magrittr
- devtools
- shinyjs
- stringi
- stringr
- jsonlite
- data.table
- htmlwidgets
- RSQLite
- BiocManager
- foreach
- doParallel
- mvtnorm
- mapdata
- proj4
- gstat
- automap
- RCALI
- rgenoud
- purrr
## github package list
#r_pkg_gtihub:
## local package list
#r_pkg_local:
---
- name: Install system libraries dependencies
become: yes
shell: |
curl -LO "{{ mac_sys_lib_repository }}/{{ item }}"
sudo tar fvxz "{{ item }}" -C /
rm "{{ item }}"
args:
warn: no
loop: "{{ mac_sys_libs }}"
when: mac_sys_libs is defined
- name: Install BiocManager
shell: /usr/local/bin/Rscript -e "install.packages(c('BiocManager'), repo='{{ r_cran_mirror }}', ask=FALSE)"
- name: Install Bioconductor pacakges
shell: /usr/local/bin/Rscript -e "BiocManager::install(c('{{ item }}'))"
loop: "{{ r_pkg_bioc }}"
when: r_pkg_bioc is defined
- name: Install CRAN packages
shell: /usr/local/bin/Rscript -e "install.packages(c('{{ item }}'), repo='{{ r_cran_mirror }}', ask=FALSE)"
loop: "{{ r_pkg_cran }}"
when: r_pkg_cran is defined
- name: Install github packages
shell: /usr/local/bin/Rscript -e "devtools::install_github(c('{{ item }}'))"
loop: "{{ r_pkg_github }}"
when: r_pkg_github is defined
- name: Install local R packages
shell: /usr/local/bin/R CMD INSTALL "{{ item }}"
loop: "{{ r_pkg_local }}"
when: r_pkg_local is defined
...@@ -14,6 +14,7 @@ echo "Installing R" ...@@ -14,6 +14,7 @@ echo "Installing R"
sudo installer -package R-4.0-branch.pkg -target / sudo installer -package R-4.0-branch.pkg -target /
rm R-4.0-branch.pkg rm R-4.0-branch.pkg
echo "export PATH=/usr/local/gfortran/bin:\$PATH" >> ~\.bashrc echo "export PATH=/usr/local/bin/:/usr/local/gfortran/bin:\$PATH" >> ~/.bashrc
echo "export PATH=/usr/local/gfortran/bin:\$PATH" >> ~\.zshrc echo "export PATH=/usr/local/bin/:/usr/local/gfortran/bin:\$PATH" >> ~/.zshrc
echo "export PATH=/usr/local/bin/:/usr/local/gfortran/bin:\$PATH" >> ~/.shrc
---
- name: Install R and dependencies
script: files/install-r.sh
#- name: reboot
# reboot:
# reboot_timeout: 600
# become: yes
- name: Configure R env
shell:
cmd: /usr/local/bin/Rscript -e "dir.create(Sys.getenv('R_LIBS_USER'), recursive=TRUE)"
...@@ -4,6 +4,6 @@ echo "Downloading Xquartz" ...@@ -4,6 +4,6 @@ echo "Downloading Xquartz"
curl -OL https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg curl -OL https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
hdiutil attach XQuartz-2.7.11.dmg hdiutil attach XQuartz-2.7.11.dmg
sudo installer -package /Volume/XQuartz*/XQuartz.pkg -target / sudo installer -package /Volume/XQuartz-2.7.11/XQuartz.pkg -target /
hdiutil detach /Volumes/XQuartz*/ hdiutil detach /Volumes/XQuartz-2.7.11/
rm XQuartz-2.7.11.dmg rm XQuartz-2.7.11.dmg
---
- name: Install Xquartz
script: files/install-xquartz.sh
...@@ -7,4 +7,3 @@ sudo chmod +x /usr/local/bin/gitlab-runner ...@@ -7,4 +7,3 @@ sudo chmod +x /usr/local/bin/gitlab-runner
# add gitlab serveur in know host # add gitlab serveur in know host
mkdir -p ~/.ssh/ || true mkdir -p ~/.ssh/ || true
ssh-keyscan -t ecdsa -H gitlab.paca.inrae.fr >> ~/.ssh/known_hosts ssh-keyscan -t ecdsa -H gitlab.paca.inrae.fr >> ~/.ssh/known_hosts
---
- name: CICD configuration install GitLab-Runner
script: files/install-gitlabrunner.sh
...@@ -8,8 +8,8 @@ sudo chmod 666 /var/db/ntp-kod ...@@ -8,8 +8,8 @@ sudo chmod 666 /var/db/ntp-kod
sudo sntp -sS pool.ntp.org sudo sntp -sS pool.ntp.org
# force time cron 1m # force time cron 1m
(sudo crontab -l 2>/dev/null; echo "1 * * * * sntp -sS pool.ntp.org") | sudo crontab - (sudo crontab -l 2>/dev/null; echo "*/1 * * * * sntp -sS pool.ntp.org") | sudo crontab -
# never know... # never know...
sudo echo "server pool.ntp.org minpoll 4 maxpoll 5" > /etc/ntp.conf #sudo echo "server pool.ntp.org minpoll 4 maxpoll 5" > /etc/ntp.conf
---
- name: disable sleep
shell:
cmd: sudo pmset -a disablesleep 1
- name: synchronize clock NTP
script: files/update-time.sh
#- name: Update MacOS
# script: files/update-macos.sh
#- name: reboot after update
# reboot:
# reboot_timeout: 3600
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment