Skip to content

Commit

Permalink
Enable software to be pulled from S3
Browse files Browse the repository at this point in the history
  • Loading branch information
gcdev373 committed Aug 22, 2023
1 parent 7b0f792 commit c305342
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stroom/roles/non_docker_proxy/download/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,21 @@
- deploy

- name: Download stroom-proxy distribution {{ stroom_proxy_url }}
when: stroom_proxy_url is match("http.*")
get_url:
url: "{{ stroom_proxy_url }}"
dest: "{{ downloads_dir }}/{{ stroom_proxy_archive_filename }}"
checksum: "sha256:{{ stroom_proxy_url }}.sha256"
timeout: 120

- name: Download stroom-proxy distribution from S3 {{ stroom_proxy_url }}
when: stroom_proxy_url is match("s3://.*")
amazon.aws.s3_object:
bucket: "{{ stroom_proxy_url.split('/').2 }}"
object: "{{ stroom_proxy_url | regex_replace('s3://[^/]+/') }}"
dest: "{{ downloads_dir }}/{{ stroom_proxy_archive_filename }}"
mode: get

- name: Unpack Stroom-proxy's distribution zip
unarchive:
src: "{{ downloads_dir }}/{{ stroom_proxy_archive_filename }}"
Expand Down
9 changes: 9 additions & 0 deletions stroom/roles/non_docker_stroom/download/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,21 @@
state: directory

- name: Download stroom distribution {{ stroom_url }}
when: stroom_url is match("http.*")
get_url:
url: "{{ stroom_url }}"
dest: "{{ downloads_dir }}/{{ stroom_archive_filename }}"
checksum: "sha256:{{ stroom_url }}.sha256"
timeout: 120

- name: Download stroom distribution from S3 {{ stroom_url }}
when: stroom_url is match("s3://.*")
amazon.aws.s3_object:
bucket: "{{ stroom_url.split('/').2 }}"
object: "{{ stroom_url | regex_replace('s3://[^/]+/') }}"
dest: "{{ downloads_dir }}/{{ stroom_archive_filename }}"
mode: get

- name: Ensure install directory {{ stroom_home_dir }} exists
file:
path: "{{ stroom_home_dir }}"
Expand Down

0 comments on commit c305342

Please sign in to comment.