Commit 927c130d by Cory Lee

Code review cleanup

parent e705f590
......@@ -71,13 +71,13 @@ SPLUNK_DASHBOARDS: []
# - {{ role_path }}/../../../secure-repo/path/to/templates/template.xml.j2
SPLUNK_APP_S3_PATH: 'BUCKET_S3_URL_GOES_HERE'
# This is the bucket where splunk apps are stored
# This is the s3 url 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
# example: s3://my-bucket-goes-here/my_optional_path
SPLUNK_APP_DOWNLOAD_PATH: "{{ splunk_home }}/etc/apps/app_downloads"
# Source bucket for splunk apps
# Where on the local filesystem we store the app tars that we download from s3
SPLUNK_APP_TARS: []
# A list of dicts that contains tars of splunk apps to install, and their md5sum
......@@ -87,6 +87,10 @@ SPLUNK_APP_TARS: []
# Add an entry to this dict
# Apps will be installed if md5sum is correct, otherwise the task will fail
# See https://docs.splunk.com/Documentation/UnixApp/5.2.3/User/InstalltheSplunkAppforUnixandLinux#Install_the_Splunk_App_for_Unix_and_Linux_from_the_command_line
# e.g.
# SPLUNK_APP_TARS:
# - file_name: "my-tar.tgz"
# md5sum: "253385a0a68caea04e81fdb4d3083dd9"
SPLUNK_ALERT_DEFAULT_SEVERITY: "3"
......
......@@ -172,21 +172,20 @@
- install:configuration
- name: discover existing app tars
shell: "test -f {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}"
stat: path={{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.file_name }}
register: app_present
tags:
- install
- install:configuration
with_items:
- "{{ SPLUNK_APP_TARS }}"
ignore_errors: True
- name: download missing tars
shell: "aws s3 cp {{ SPLUNK_APP_S3_PATH }}/{{ item.1.file_name }} {{ SPLUNK_APP_DOWNLOAD_PATH }}/{{ item.1.file_name }}"
tags:
- install
- install:configuration
when: item.0.rc != 0
when: not item.0.stat.exists
with_together:
- "{{ app_present.results }}"
- "{{ SPLUNK_APP_TARS }}"
......
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