Skip to content

Commit 9da32ec

Browse files
committed
Fix the usage of the manager-apps dir on the cm from 9.0.0 on
1 parent dcd67ee commit 9da32ec

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

7+
## [2.2.2](https://github.com/splunk/splunk-platform-automator/releases/tag/v2.2.2) - tbd
8+
9+
### Fixed
10+
11+
- Fix the usage of the manager-apps dir on the cm from 9.0.0 on
12+
713
## [2.2.1](https://github.com/splunk/splunk-platform-automator/releases/tag/v2.2.1) - 2024-02-11
814

915
### Fixed

ansible/group_vars/all/dynamic.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ splunk_manager_uri_var: "{%- if splunk_installed_version is version_compare('9.0
9696
splunk_clustermanager_var: "{%- if splunk_installed_version is version_compare('9.0', '>=') -%}clustermanager{%- else -%}clustermaster{%- endif -%}"
9797
splunk_cluster_manager_mode: "{%- if splunk_installed_version is version_compare('9.0', '>=') -%}manager{%- else -%}master{%- endif -%}"
9898
splunk_cluster_peer_mode: "{%- if splunk_installed_version is version_compare('9.0', '>=') -%}peer{%- else -%}slave{%- endif -%}"
99-
99+
splunk_cluster_manager_apps: "{%- if splunk_installed_version is version_compare('9.0', '>=') -%}manager-apps{%- else -%}master-apps{%- endif -%}"
100100

101101
# Multisite Indexer Cluster
102102
splunk_idxc_available_sites: "{{ idxc_available_sites|default([])|join(',') }}"

ansible/roles/cluster_manager/tasks/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
name: baseconfig_app
109109
vars:
110110
app_name: 'org_indexer_volume_indexes'
111-
app_path: '{{splunk_home}}/etc/master-apps'
111+
app_path: '{{splunk_home}}/etc/{{splunk_cluster_manager_apps}}'
112112

113113
- name: apply baseconfig app org_all_indexes
114114
tags:
@@ -120,7 +120,7 @@
120120
name: baseconfig_app
121121
vars:
122122
app_name: 'org_all_indexes'
123-
app_path: '{{splunk_home}}/etc/master-apps'
123+
app_path: '{{splunk_home}}/etc/{{splunk_cluster_manager_apps}}'
124124

125125
- name: apply baseconfig app org_s2_indexer_indexes
126126
tags:
@@ -132,7 +132,7 @@
132132
name: baseconfig_app
133133
vars:
134134
app_name: 'org_s2_indexer_indexes'
135-
app_path: '{{splunk_home}}/etc/master-apps'
135+
app_path: '{{splunk_home}}/etc/{{splunk_cluster_manager_apps}}'
136136
when: splunk_volume_defaults.remotePath is defined
137137

138138
- name: apply baseconfig app org_full_license_server
@@ -145,7 +145,7 @@
145145
name: baseconfig_app
146146
vars:
147147
app_name: 'org_full_license_server'
148-
app_path: '{{splunk_home}}/etc/master-apps'
148+
app_path: '{{splunk_home}}/etc/{{splunk_cluster_manager_apps}}'
149149
when: splunk_license_manager|default()|length > 0
150150

151151
- name: call update_dserver from role monitoring_console

ansible/roles/splunk_software/templates/home/splunk/bashrc.splunk.j2

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
export SPLUNK_HOME={{ splunk_home }}
33
export PATH=$PATH:$SPLUNK_HOME/bin
44

5+
# Functions
6+
cdmanager()
7+
{
8+
# Check if there is a manager-apps dir
9+
if [ -d $SPLUNK_HOME/etc/manager-apps ];
10+
then
11+
cd $SPLUNK_HOME/etc/manager-apps
12+
else
13+
cd $SPLUNK_HOME/etc/master-apps
14+
fi
15+
}
16+
517
# Aliases
618
alias cs="cd $SPLUNK_HOME"
719
alias ce="cd $SPLUNK_HOME/etc"
820
alias ca="cd $SPLUNK_HOME/etc/apps"
9-
alias cm="cd $SPLUNK_HOME/etc/master-apps"
21+
alias cm=cdmanager
1022
alias ch="cd $SPLUNK_HOME/etc/shcluster/apps"
1123
alias cdd="cd $SPLUNK_HOME/etc/deployment-apps"
1224
alias cdl="cd $SPLUNK_HOME/var/log/splunk"

0 commit comments

Comments
 (0)