diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7d43d923..180bd5dc 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,7 @@ ## Navigation +* [9.0.5](#905) * [9.0.4.1](#9041) * [9.0.4](#904) * [9.0.0](#900) @@ -70,6 +71,14 @@ --- +## 9.0.5 + +#### Changes +* Support for latest major Splunk release +* Documentation updates + bugfixes + +--- + ## 9.0.4.1 #### Changes diff --git a/roles/splunk_common/tasks/get_facts.yml b/roles/splunk_common/tasks/get_facts.yml index 58b3aec9..bb9b2f84 100644 --- a/roles/splunk_common/tasks/get_facts.yml +++ b/roles/splunk_common/tasks/get_facts.yml @@ -79,7 +79,7 @@ # and allowing upgrades between new and old hashes of the same version. - name: "Setting upgrade fact" set_fact: - splunk_upgrade: "{{ 'build_location' in splunk and splunk.build_location and not splunk_install and splunk_target_version and ((splunk_target_version != splunk_current_version) or (splunk_current_build_hash != splunk_target_build_hash))| default(False) }}" + splunk_upgrade: "{{ not first_run and 'build_location' in splunk and splunk.build_location and not splunk_install and splunk_target_version and ((splunk_target_version != splunk_current_version) or (splunk_current_build_hash != splunk_target_build_hash))| default(False) }}" # determine if we need to set up indexer clusters - name: "Setting indexer cluster fact from config" diff --git a/roles/splunk_common/tasks/install_splunk.yml b/roles/splunk_common/tasks/install_splunk.yml index 50dbf858..d4969ee6 100644 --- a/roles/splunk_common/tasks/install_splunk.yml +++ b/roles/splunk_common/tasks/install_splunk.yml @@ -24,6 +24,26 @@ - "{{ splunk.home }}/Python-2.7" when: splunk_upgrade | bool +- name: Find all files to clean up in Splunk home for fresh install + find: + path: "{{ splunk.home }}" + file_type: file + ignore_errors: yes + become: yes + become_user: "{{ privileged_user }}" + register: cleanup_files + when: not splunk_upgrade + +- name: Clean up Splunk home for fresh install + file: + path: "{{ item.path }}" + state: "absent" + ignore_errors: yes + become: yes + become_user: "{{ privileged_user }}" + with_items: "{{ cleanup_files.files }}" + when: not splunk_upgrade + - name: Install Splunk include_tasks: install_splunk_{{ splunk_build_type }}.yml diff --git a/roles/splunk_common/tasks/wait_for_splunk_process.yml b/roles/splunk_common/tasks/wait_for_splunk_process.yml index 264ac950..d328635c 100644 --- a/roles/splunk_common/tasks/wait_for_splunk_process.yml +++ b/roles/splunk_common/tasks/wait_for_splunk_process.yml @@ -9,4 +9,4 @@ wait_for: host: 127.0.0.1 port: "{{ splunk.svc_port }}" - timeout: 180 + timeout: 900