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
8 changes: 4 additions & 4 deletions roles/splunk_common/tasks/get_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@

- name: "Set current version fact"
set_fact:
splunk_current_version: "{{ manifests.files[0].path | regex_search(regexp, '\\1') if (manifests.matched == 1) else '0' }}"
splunk_current_build_hash: "{{ manifests.files[0].path | regex_search(regexp, '\\3') if (manifests.matched == 1) else '0' }}"
splunk_target_build_hash: "{{ splunk.build_location | string | regex_search(regexp, '\\3') | default('0') }}"
splunk_current_version: "{{ manifests.files[0].path | regex_search(regexp, '\\1') | first if (manifests.matched == 1) else '0' }}"
splunk_current_build_hash: "{{ manifests.files[0].path | regex_search(regexp, '\\3') | first if (manifests.matched == 1) else '0' }}"
splunk_target_build_hash: "{{ splunk.build_location | string | regex_search(regexp, '\\3') | first | default('0') }}"
vars:
regexp: 'splunk\D*?-(\d+\.\d+\.\d+(\.\d+)?)-(.*?)-.*?'

- name: "Determine if Splunk has preinstall checks"
set_fact:
splunk_preinstall: "{{ splunk_target_version | first is version('9.4.0', '>=') }}"
splunk_preinstall: "{{ splunk_target_version is version('9.4.0', '>=') }}"
when: splunk_target_version is defined and splunk_target_version | length > 0

# We are upgrading if it is not a fresh installation and the current version is different from the target version,
Expand Down