Skip to content

Commit

Permalink
Add maxent tasks to spatial-service role (#828)
Browse files Browse the repository at this point in the history
* Fix for #383
  • Loading branch information
vjrj authored Sep 23, 2024
1 parent b572b0a commit 3e6c0c5
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions ansible/roles/spatial-service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,51 @@
tags:
- spatial-service
- spatial-deps

- name: Download maxent.zip
get_url:
url: 'https://biodiversityinformatics.amnh.org/open_source/maxent/maxent.php?op=download'
dest: /tmp/maxent.zip
tags:
- spatial-service
- spatial-deps

- name: Create directory for maxent
file: path={{data_dir}}/spatial-data/modelling/maxent owner={{tomcat_user}} group={{tomcat_user}} recurse=true state=directory mode='0755'
tags:
- spatial-service
- spatial-deps

- name: Extract maxent.zip
unarchive:
src: /tmp/maxent.zip
dest: /tmp/
remote_src: true
tags:
- spatial-service
- spatial-deps

- name: Copy maxent.jar to the destination directory
copy:
src: /tmp/maxent/maxent.jar
dest: "{{data_dir}}/spatial-data/modelling/maxent/maxent.jar"
remote_src: true
tags:
- spatial-service
- spatial-deps

- name: Remove temporary maxent.zip file
file:
path: /tmp/maxent.zip
state: absent
tags:
- spatial-service
- spatial-deps

- name: Remove extracted maxent directory
file:
path: /tmp/maxent
state: absent
tags:
- spatial-service
- spatial-deps

0 comments on commit 3e6c0c5

Please sign in to comment.