From 2a3c86a412ad8e9fae401c2a4c66823714f8e9b7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 9 Apr 2018 16:15:39 +0200 Subject: [PATCH] library/roles/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml: Also install the algorithms updater script with the algorithms. Leave alone the cron job only. --- .../tasks/dataminer-algorithms-installer.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml b/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml index bc83dd2d..30d1a37b 100644 --- a/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml +++ b/smartgears/dataminer_app/tasks/dataminer-algorithms-installer.yml @@ -48,12 +48,6 @@ unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dataminer_algorithms_file }} dest={{ smartgears_user_home }} creates='{{ smartgears_user_home }}/algorithmInstaller/addAlgorithm.sh' 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' ] @@ -63,6 +57,12 @@ template: src=algorithms-updater.j2 dest=/usr/local/bin/algorithms-updater mode=0755 tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_script' ] + become: True + become_user: '{{ smartgears_user }}' + when: dataminer_algorithms_installer + tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ] + +- block: - name: Cron job that updates the algorithms repository and adds the missing algorithms configurations cron: name="SVN update the algorithms repository" minute="{{ dataminer_algorithms_updater_minute_frequency }}" hour="{{ dataminer_algorithms_updater_hour_frequency }}" job="/usr/local/bin/algorithms-updater > {{ smartgears_user_home }}/wps_algorithms_install_log/algorithms_updater_cron.log 2>&1" user='{{ smartgears_user }}' state={{ dataminer_algorithms_updater_cron }} tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_cron' ]