From 86d22d6e75d2b8e29e3f1a2c45de06d4807775f9 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 9 Apr 2018 15:14:44 +0200 Subject: [PATCH] dataminer: separate the algorithm installer from the algorithm updater. Install the algorithm installer on che core nlp VM. --- smartgears/dataminer_app/defaults/main.yml | 1 + .../tasks/dataminer-algorithms-installer.yml | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/smartgears/dataminer_app/defaults/main.yml b/smartgears/dataminer_app/defaults/main.yml index 19f9b112..853c22c9 100644 --- a/smartgears/dataminer_app/defaults/main.yml +++ b/smartgears/dataminer_app/defaults/main.yml @@ -2,6 +2,7 @@ dataminer_app_install: False dataminer_app_upgrade: False dataminer_algorithms_installer: True +dataminer_algorithms_updater: True # ZIP file dataminer_product: prod diff --git a/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml b/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml index d05d980d..bc83dd2d 100644 --- a/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml +++ b/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml @@ -46,9 +46,14 @@ - name: Unarchive the algorithms installer unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dataminer_algorithms_file }} dest={{ smartgears_user_home }} creates='{{ smartgears_user_home }}/algorithmInstaller/addAlgorithm.sh' - notify: Restart smartgears tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ] + become: True + become_user: '{{ smartgears_user }}' + when: dataminer_algorithms_installer + tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ] + +- block: - name: Create a directory where to install the algorithms updater logs and data file: path={{ smartgears_user_home }}/wps_algorithms_install_log state=directory tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_script' ] @@ -64,7 +69,7 @@ become: True become_user: '{{ smartgears_user }}' - when: dataminer_algorithms_installer + when: dataminer_algorithms_updater tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ] - block: @@ -74,7 +79,7 @@ become: True become_user: '{{ smartgears_user }}' - when: not dataminer_algorithms_installer + when: not dataminer_algorithms_updater tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ] \ No newline at end of file