From 05c509a683f9ebab493ab3cc447bb4da27d3ea5e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 14 Dec 2015 11:31:01 +0100 Subject: [PATCH 1/3] library/roles/ubuntu-deb-general/defaults/main.yml: Install curl by default. --- ubuntu-deb-general/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ubuntu-deb-general/defaults/main.yml b/ubuntu-deb-general/defaults/main.yml index 986f2f58..bce118aa 100644 --- a/ubuntu-deb-general/defaults/main.yml +++ b/ubuntu-deb-general/defaults/main.yml @@ -10,6 +10,7 @@ common_packages: - zile - dstat - iotop + - curl - wget - vim-tiny - psmisc From 572cbf3fc521829d882a3e7944cea41ca42c2de1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 16 Dec 2015 13:50:18 +0100 Subject: [PATCH 2/3] d4science-ghn-cluster/group_vars/*/r-packages.yml: Fix the dataminer r-packages order installation. d4science-ghn-cluster/inventory/hosts.production: Production dataminer hostnames. --- haproxy/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haproxy/tasks/main.yml b/haproxy/tasks/main.yml index 10650d20..ba53d9b9 100644 --- a/haproxy/tasks/main.yml +++ b/haproxy/tasks/main.yml @@ -31,7 +31,7 @@ tags: haproxy - name: Ensure that haproxy is enabled and started - service: name=haproxy state=started enabled=yes + service: name=haproxy state=restarted enabled=yes when: haproxy_enabled ignore_errors: True tags: haproxy From ed3373a5728e2a6c2e1eb4449642c7101aa93f1a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 16 Dec 2015 14:14:44 +0100 Subject: [PATCH 3/3] library/roles/R/tasks/main.yml: Run twice the installation of plugin from specific source files, to deal with circular dependencies. --- R/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/R/tasks/main.yml b/R/tasks/main.yml index d76005e1..b8fb9e99 100644 --- a/R/tasks/main.yml +++ b/R/tasks/main.yml @@ -43,6 +43,17 @@ tags: [ 'r_software', 'r_pkg', 'r_plugins', 'r_plugins_version' ] - name: Install R packages from the cran sources, specific versions + command: > + Rscript --slave --no-save --no-restore-history -e "if (! ('{{ item.name }}' %in% installed.packages()[,'Package'])) { install.packages('{{ r_source_plugins_dest_dir }}/{{ item.source }}', repos = NULL, type='source'); print('Added'); } else if (packageVersion('{{ item.name }}') != '{{ item.version }}') { install.packages('{{ r_source_plugins_dest_dir }}/{{ item.source }}', repos = NULL, type='source'); print('Added'); } else { print('Already Installed'); }" + register: install_s_plugins_result + failed_when: "install_s_plugins_result.rc != 0 or 'had non-zero exit status' in install_s_plugins_result.stderr" + changed_when: '"Added" in install_s_plugins_result.stdout' + with_items: r_plugins_from_sources + when: r_plugins_install_specific_source + ignore_errors: True + tags: [ 'r_software', 'r_pkg', 'r_plugins', 'r_plugins_version' ] + +- name: Install R packages from the cran sources, specific versions. Second round, to avoid circular dependencies command: > Rscript --slave --no-save --no-restore-history -e "if (! ('{{ item.name }}' %in% installed.packages()[,'Package'])) { install.packages('{{ r_source_plugins_dest_dir }}/{{ item.source }}', repos = NULL, type='source'); print('Added'); } else if (packageVersion('{{ item.name }}') != '{{ item.version }}') { install.packages('{{ r_source_plugins_dest_dir }}/{{ item.source }}', repos = NULL, type='source'); print('Added'); } else { print('Already Installed'); }" register: install_s_plugins_result