From 6fd104026f5f6b5530d01139ecbec047bb5ba1ef Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 5 May 2016 19:33:37 +0200 Subject: [PATCH] library/roles/opencpu: Role that installs opencpu. d4science-ghn-cluster: Install opencpu on opencpu-d4s.d4science.org. Create a reverse proxy rule on access.d4science.org. --- opencpu/defaults/main.yml | 13 +++++++++++++ opencpu/tasks/main.yml | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 opencpu/defaults/main.yml create mode 100644 opencpu/tasks/main.yml diff --git a/opencpu/defaults/main.yml b/opencpu/defaults/main.yml new file mode 100644 index 0000000..9d44bce --- /dev/null +++ b/opencpu/defaults/main.yml @@ -0,0 +1,13 @@ +--- +# https://www.opencpu.org/download.html +# It installs a local apache instance +opencpu_install: True +opencpu_version: 1.5 +opencpu_repo: 'ppa:opencpu/opencpu-{{ opencpu_version }}' +opencpu_pkg_state: latest +opencpu_pkgs: + - opencpu + +opencpu_proxy_port: 8004 +opencpu_context: /ocpu + diff --git a/opencpu/tasks/main.yml b/opencpu/tasks/main.yml new file mode 100644 index 0000000..ab8b91e --- /dev/null +++ b/opencpu/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- block: + + - name: Install the opencpu repository + apt_repository: repo={{ opencpu_repo }} update_cache=yes + + - name: Install the opencpu package + apt: pkg={{ item }} state={{ opencpu_pkg_state }} + with_items: '{{ opencpu_pkgs }}' + + tags: opencpu + when: opencpu_install