2016-10-18 15:07:47 +02:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install the R packages updater script
|
|
|
|
template: src=update_r_packages.sh.j2 dest=/usr/local/bin/update_r_packages owner=root group=root mode=0755
|
|
|
|
|
2016-10-24 15:33:27 +02:00
|
|
|
- name: Create the R packages updater SVN base directory
|
|
|
|
file: dest={{ r_packages_svn_base_dir }} state=directory
|
|
|
|
|
2016-10-18 15:07:47 +02:00
|
|
|
- name: Cron job that installs new R packages, if any
|
2016-11-11 17:04:17 +01:00
|
|
|
cron: name="install new R packages" user=root cron_file=install-r-packages minute="*/10" job="/usr/local/bin/update_r_packages install >/var/log/install_r_packages 2>&1" state=present
|
2016-10-18 15:07:47 +02:00
|
|
|
|
|
|
|
- name: Cron job that upgrades existing R packages and installs new ones, if any
|
2016-11-11 17:04:17 +01:00
|
|
|
cron: name="install new R packages" user=root cron_file=upgrade-r-packages hour="3" job="/usr/local/bin/update_r_packages upgrade >/var/log/update_r_packages 2>&1" state=present
|
2016-10-18 15:07:47 +02:00
|
|
|
|
|
|
|
when: r_packages_updater
|
2016-10-24 15:33:27 +02:00
|
|
|
tags: [ 'r_software', 'r_pkg', 'r_plugins', 'r_plugins_github', 'r_cran_pkgs', 'r_github_pkgs', 'r_packages_updater' ]
|
2016-10-18 15:07:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Remove the R packages updater script
|
|
|
|
file: dest=/usr/local/bin/update_r_packages state=absent
|
|
|
|
|
2016-10-24 15:33:27 +02:00
|
|
|
- name: Remove the R packages updater SVN base directory
|
|
|
|
file: dest={{ r_packages_svn_base_dir }} state=absent
|
|
|
|
|
2016-10-18 15:07:47 +02:00
|
|
|
- name: Remove the cron job that installs new R packages
|
2016-11-11 17:04:17 +01:00
|
|
|
cron: name="install new R packages" user=root minute="*/10" cron_file=install-r-packages job="/usr/local/bin/update_r_packages install >/var/log/install_r_packages 2>&1" state=absent
|
2016-10-18 15:07:47 +02:00
|
|
|
|
|
|
|
- name: Remove the cron job that upgrades existing R packages and installs new ones
|
2016-11-11 17:04:17 +01:00
|
|
|
cron: name="install new R packages" user=root cron_file=upgrade-r-packages hour="3" job="/usr/local/bin/update_r_packages upgrade >/var/log/update_r_packages 2>&1" state=absent
|
2016-10-18 15:07:47 +02:00
|
|
|
|
|
|
|
when: not r_packages_updater
|
2016-10-24 15:33:27 +02:00
|
|
|
tags: [ 'r_software', 'r_pkg', 'r_plugins', 'r_plugins_github', 'r_cran_pkgs', 'r_github_pkgs', 'r_packages_updater' ]
|