Commit 8a065a45 by Cory Lee

OPS-2532 Dont download tars if you already have them

parent 93c0aa38
...@@ -70,7 +70,12 @@ SPLUNK_DASHBOARDS: [] ...@@ -70,7 +70,12 @@ SPLUNK_DASHBOARDS: []
# e.g. # e.g.
# - {{ role_path }}/../../../secure-repo/path/to/templates/template.xml.j2 # - {{ role_path }}/../../../secure-repo/path/to/templates/template.xml.j2
SPLUNK_APP_S3_PATH: 's3://edx-splunk/apps' SPLUNK_APP_S3_PATH: 'BUCKET_S3_URL_GOES_HERE'
# This is the bucket where splunk apps are stored
# A valid bucket name is not provided above because we dont want the bucket to be claimed by someone else
#
# example: s3://my-bucket-goes-here
SPLUNK_APP_DOWNLOAD_PATH: "{{ splunk_home }}/etc/apps/app_downloads" SPLUNK_APP_DOWNLOAD_PATH: "{{ splunk_home }}/etc/apps/app_downloads"
# Source bucket for splunk apps # Source bucket for splunk apps
......
...@@ -171,14 +171,24 @@ ...@@ -171,14 +171,24 @@
- install - install
- install:configuration - install:configuration
- name: download app tars - name: discover existing app tars
shell: "aws s3 cp {{ SPLUNK_APP_S3_PATH }}/{{ item.file_name }} {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}" shell: "test -f {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}"
register: app_present
tags: tags:
- install - install
- install:configuration - install:configuration
with_items: with_items:
- "{{ SPLUNK_APP_TARS }}" - "{{ SPLUNK_APP_TARS }}"
- name: download missing tars
shell: "aws s3 cp {{ SPLUNK_APP_S3_PATH }}/{{ item.file_name }} {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}"
tags:
- install
- install:configuration
when: item.rc != 0
with_items:
- "{{ app_present.results }}"
- name: verify app checksums - name: verify app checksums
shell: "echo \"{{ item.md5sum }} {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}\" | md5sum -c --status" shell: "echo \"{{ item.md5sum }} {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}\" | md5sum -c --status"
tags: tags:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment