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