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' ]