From 81b552d3ec0de6c199c3169d4f4e7248083cb989 Mon Sep 17 00:00:00 2001 From: sgontla <69372540+sgontla@users.noreply.github.com> Date: Fri, 14 Oct 2022 11:35:08 -0700 Subject: [PATCH 1/6] CSPL-2088: [Splunk 9.0.x]KV store fails to come up on a pod reset (#700) When a Pod resets, a new pod comes up and uses the same persistent `etc` and `var` locations. Pod reset causes the file permissions to change. Open permissions on `var/lib/splunk/kvstore/mongo/splunk.key` causing the Mongod 4.2.17 to come up during the migration path, that way the mongod is marked to start with 3.6.x, and that fails forever as the existing mongod db is already 4.2.x compatiable. --- roles/splunk_common/tasks/get_splunk_status.yml | 7 +++++++ roles/splunk_common/tasks/restrict_permissions.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/splunk_common/tasks/get_splunk_status.yml b/roles/splunk_common/tasks/get_splunk_status.yml index debf7f61..6162c15f 100644 --- a/roles/splunk_common/tasks/get_splunk_status.yml +++ b/roles/splunk_common/tasks/get_splunk_status.yml @@ -1,4 +1,11 @@ --- +- name: "Restrict permissions on splunk.key for Status" + include_tasks: restrict_permissions.yml + vars: + file_path: "{{ item }}" + with_items: + - "{{ splunk.home }}/var/lib/splunk/kvstore/mongo/splunk.key" + - name: Get Splunk status command: "{{ splunk.exec }} status --accept-license --answer-yes --no-prompt" become: yes diff --git a/roles/splunk_common/tasks/restrict_permissions.yml b/roles/splunk_common/tasks/restrict_permissions.yml index 447bceb1..ee80cf66 100644 --- a/roles/splunk_common/tasks/restrict_permissions.yml +++ b/roles/splunk_common/tasks/restrict_permissions.yml @@ -10,7 +10,7 @@ - name: "Restrict permissions on {{ file_path }}" file: - mode: "go-rwx" + mode: u+rw,g-rwx,o-rwx path: "{{ file_path }}" become: yes become_user: "{{ splunk.user }}" From 19250b223bc4eba28bb2d51528ea57102eaa28f0 Mon Sep 17 00:00:00 2001 From: Troy Fontaine Date: Mon, 7 Nov 2022 17:48:50 -0600 Subject: [PATCH 2/6] Fix Typo and Update Multisite SHC Setup (#702) Signed-off-by: Troy Fontaine Updates the typo in "Extrenal" text names and modifies the setup_multisite for the SHC to use the SHC pass4symkey instead of the idxc pass4symkey. --- roles/splunk_cluster_master/tasks/setup_multisite.yml | 2 +- roles/splunk_indexer/tasks/setup_multisite.yml | 2 +- roles/splunk_monitor/tasks/setup_multisite.yml | 2 +- roles/splunk_search_head/tasks/setup_multisite.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/splunk_cluster_master/tasks/setup_multisite.yml b/roles/splunk_cluster_master/tasks/setup_multisite.yml index 4a65dc38..b143c8f9 100644 --- a/roles/splunk_cluster_master/tasks/setup_multisite.yml +++ b/roles/splunk_cluster_master/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert Extrenal Cluster Master Name into Internal URI +- name: Convert External Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_indexer/tasks/setup_multisite.yml b/roles/splunk_indexer/tasks/setup_multisite.yml index 014e5ae2..012640ae 100644 --- a/roles/splunk_indexer/tasks/setup_multisite.yml +++ b/roles/splunk_indexer/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert Extrenal Cluster Master Name into Internal URI +- name: Convert External Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_monitor/tasks/setup_multisite.yml b/roles/splunk_monitor/tasks/setup_multisite.yml index f9f67dfd..04d327f0 100644 --- a/roles/splunk_monitor/tasks/setup_multisite.yml +++ b/roles/splunk_monitor/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert Extrenal Cluster Master Name into Internal URI +- name: Convert External Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_search_head/tasks/setup_multisite.yml b/roles/splunk_search_head/tasks/setup_multisite.yml index ef65dc72..2891c800 100644 --- a/roles/splunk_search_head/tasks/setup_multisite.yml +++ b/roles/splunk_search_head/tasks/setup_multisite.yml @@ -3,12 +3,12 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert Extrenal Cluster Master Name into Internal URI +- name: Convert External Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" - name: Setup SHC - Multisite - command: "{{ splunk.exec }} edit cluster-config -mode searchhead -master_uri {{ multisite_master_uri }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }}" + command: "{{ splunk.exec }} edit cluster-config -mode searchhead -master_uri {{ multisite_master_uri }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.shc.pass4SymmKey }}" become: yes become_user: "{{ splunk.user }}" register: set_new_master @@ -28,7 +28,7 @@ - include_tasks: ../../../roles/splunk_common/tasks/wait_for_splunk_process.yml - name: Setup SHC with Associated Site - command: "{{ splunk.exec }} edit cluster-master -old_master_uri {{ multisite_master_uri }} -site {{ splunk.site }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }} -multisite True" + command: "{{ splunk.exec }} edit cluster-master -old_master_uri {{ multisite_master_uri }} -site {{ splunk.site }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.shc.pass4SymmKey }} -multisite True" become: yes become_user: "{{ splunk.user }}" register: set_associated_site From bf13b58ad570fcc86f2f906f83587001c609d3b9 Mon Sep 17 00:00:00 2001 From: Alisha Mayor Date: Thu, 10 Nov 2022 14:18:30 -0800 Subject: [PATCH 3/6] Revert "Fix Typo and Update Multisite SHC Setup (#702)" (#703) This reverts commit 19250b223bc4eba28bb2d51528ea57102eaa28f0. --- roles/splunk_cluster_master/tasks/setup_multisite.yml | 2 +- roles/splunk_indexer/tasks/setup_multisite.yml | 2 +- roles/splunk_monitor/tasks/setup_multisite.yml | 2 +- roles/splunk_search_head/tasks/setup_multisite.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/splunk_cluster_master/tasks/setup_multisite.yml b/roles/splunk_cluster_master/tasks/setup_multisite.yml index b143c8f9..4a65dc38 100644 --- a/roles/splunk_cluster_master/tasks/setup_multisite.yml +++ b/roles/splunk_cluster_master/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert External Cluster Master Name into Internal URI +- name: Convert Extrenal Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_indexer/tasks/setup_multisite.yml b/roles/splunk_indexer/tasks/setup_multisite.yml index 012640ae..014e5ae2 100644 --- a/roles/splunk_indexer/tasks/setup_multisite.yml +++ b/roles/splunk_indexer/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert External Cluster Master Name into Internal URI +- name: Convert Extrenal Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_monitor/tasks/setup_multisite.yml b/roles/splunk_monitor/tasks/setup_multisite.yml index 04d327f0..f9f67dfd 100644 --- a/roles/splunk_monitor/tasks/setup_multisite.yml +++ b/roles/splunk_monitor/tasks/setup_multisite.yml @@ -3,7 +3,7 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert External Cluster Master Name into Internal URI +- name: Convert Extrenal Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" diff --git a/roles/splunk_search_head/tasks/setup_multisite.yml b/roles/splunk_search_head/tasks/setup_multisite.yml index 2891c800..ef65dc72 100644 --- a/roles/splunk_search_head/tasks/setup_multisite.yml +++ b/roles/splunk_search_head/tasks/setup_multisite.yml @@ -3,12 +3,12 @@ vars: splunk_instance_address: "{{ splunk.multisite_master }}" -- name: Convert External Cluster Master Name into Internal URI +- name: Convert Extrenal Cluster Master Name into Internal URI set_fact: multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}" - name: Setup SHC - Multisite - command: "{{ splunk.exec }} edit cluster-config -mode searchhead -master_uri {{ multisite_master_uri }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.shc.pass4SymmKey }}" + command: "{{ splunk.exec }} edit cluster-config -mode searchhead -master_uri {{ multisite_master_uri }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }}" become: yes become_user: "{{ splunk.user }}" register: set_new_master @@ -28,7 +28,7 @@ - include_tasks: ../../../roles/splunk_common/tasks/wait_for_splunk_process.yml - name: Setup SHC with Associated Site - command: "{{ splunk.exec }} edit cluster-master -old_master_uri {{ multisite_master_uri }} -site {{ splunk.site }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.shc.pass4SymmKey }} -multisite True" + command: "{{ splunk.exec }} edit cluster-master -old_master_uri {{ multisite_master_uri }} -site {{ splunk.site }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }} -multisite True" become: yes become_user: "{{ splunk.user }}" register: set_associated_site From eee488d875bc19ebe6136ab57087b3bca3f083c7 Mon Sep 17 00:00:00 2001 From: gaurav-splunk <69282718+gaurav-splunk@users.noreply.github.com> Date: Mon, 9 Jan 2023 10:52:14 -0800 Subject: [PATCH 4/6] fix ansible code to not update web.conf when false (#704) --- roles/splunk_common/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/splunk_common/tasks/main.yml b/roles/splunk_common/tasks/main.yml index a212069d..2c179c39 100644 --- a/roles/splunk_common/tasks/main.yml +++ b/roles/splunk_common/tasks/main.yml @@ -93,6 +93,7 @@ - include_tasks: enable_splunkweb_ssl.yml when: - "'http_enableSSL' in splunk and splunk.http_enableSSL is not none" + - splunk.http_enableSSL | bool - include_tasks: enable_splunkd_ssl.yml when: "'ssl' in splunk and splunk.ssl" @@ -130,4 +131,4 @@ - include_tasks: add_splunk_license.yml - include_tasks: disable_popups.yml - when: "'disable_popups' in splunk and splunk.disable_popups | bool" \ No newline at end of file + when: "'disable_popups' in splunk and splunk.disable_popups | bool" From 8b05f65078cd5c94a5d4d4d2c19090493c11ac00 Mon Sep 17 00:00:00 2001 From: adityapinglesf <79232267+adityapinglesf@users.noreply.github.com> Date: Mon, 9 Jan 2023 14:35:14 -0500 Subject: [PATCH 5/6] removed unused CI configs; (#705) --- .circleci/config.yml | 39 --------------------------------------- README.md | 1 - 2 files changed, 40 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1577aa42..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: 2.1 - -executors: - circleci_xlarge: - machine: - image: ubuntu-2004:202201-02 - resource_class: xlarge - -jobs: - splunk-ansible-test: - executor: circleci_xlarge - steps: - - checkout - - run: - name: Setup Python3 - command: | - pyenv versions - pyenv global 2.7.18 3.10.2 - python --version - pip --version - python3 --version - pip3 --version - - run: - name: Run small tests - command: make py3k-small-tests - - run: - name: Run large (molecule) tests - command: make py3k-large-tests - - store_artifacts: - path: tests/results - destination: tests/results - - store_test_results: - path: tests/results - -workflows: - version: 2 - run_tests: - jobs: - - splunk-ansible-test diff --git a/README.md b/README.md index ae870e23..a2126358 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Splunk-Ansible: Provisioning Splunk Enterprise the Easy Way -[![Build Status](https://circleci.com/gh/splunk/splunk-ansible/tree/develop.svg?style=svg)](https://circleci.com/gh/splunk/splunk-ansible/tree/develop)  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)  [![GitHub release](https://img.shields.io/github/v/tag/splunk/splunk-ansible?sort=semver&label=Version)](https://github.com/splunk/splunk-ansible/releases) From eff12e3250998fb1567164d731b98907720b7edd Mon Sep 17 00:00:00 2001 From: Aditya Pingle Date: Tue, 14 Feb 2023 15:16:06 -0500 Subject: [PATCH 6/6] updated Changelog for 9.0.4 release; --- docs/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1bd91404..479cff40 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,7 @@ ## Navigation +* [9.0.4](#904) * [9.0.0](#900) * [8.2.6](#826) * [8.2.5](#825) @@ -66,6 +67,14 @@ --- +## 9.0.4 + +#### Changes +* Support for latest major Splunk release +* Documentation updates + bugfixes + +--- + ## 9.0.0 #### Changes