Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions roles/splunk_common/tasks/install_splunk_tgz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
when:
- splunk.build_location is match("^(https?)://.*")
- splunk.artifact_auth_user is undefined or splunk.artifact_auth_user == ""
register: download_result
until: download_result is succeeded
register: download_result_bearer
until: download_result_bearer is succeeded
retries: 5
delay: "{{ retry_delay }}"
become: yes
Expand All @@ -34,17 +34,27 @@
- splunk.build_location is match("^(https?)://.*")
- splunk.artifact_auth_user is defined
- splunk.artifact_auth_user != ""
register: download_result
until: download_result is succeeded
register: download_result_basic
until: download_result_basic is succeeded
retries: 5
delay: "{{ retry_delay }}"
become: yes
become_user: "{{ privileged_user }}"

- name: Define a path for the downloaded package
- name: Define a path for the downloaded package (bearer token)
set_fact:
splunk_downloaded_build_location: "{{ download_result.dest }}"
when: splunk.build_location is match("^(https?)://.*")
splunk_downloaded_build_location: "{{ download_result_bearer.dest }}"
when:
- splunk.build_location is match("^(https?)://.*")
- splunk.artifact_auth_user is undefined or splunk.artifact_auth_user == ""

- name: Define a path for the downloaded package (basic auth)
set_fact:
splunk_downloaded_build_location: "{{ download_result_basic.dest }}"
when:
- splunk.build_location is match("^(https?)://.*")
- splunk.artifact_auth_user is defined
- splunk.artifact_auth_user != ""

- name: Define a regex replacement for splunk.build_location
set_fact:
Expand Down