Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions inventory/splunk_defaults_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ splunk:
search_factor: 3
replication_factor: 3
replication_port: 9887
replication_ssl: False
dfs:
enable: False
port: 9000
Expand Down
1 change: 1 addition & 0 deletions inventory/splunk_defaults_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ splunk:
search_factor: 3
replication_factor: 3
replication_port: 9887
replication_ssl: False
multisite_replication_factor_origin: 2
multisite_replication_factor_total: 3
multisite_search_factor_origin: 1
Expand Down
18 changes: 17 additions & 1 deletion roles/splunk_indexer/tasks/indexer_clustering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
vars:
splunk_instance_address: "{{ splunk.cluster_master_url }}"

- name: Set current node as indexer cluster peer
- name: Set current node as indexer cluster peer (non-SSL replication)
command: "{{ splunk.exec }} edit cluster-config -mode slave -master_uri '{{ cert_prefix }}://{{ splunk.cluster_master_url }}:{{ splunk.svc_port }}' -replication_port {{ splunk.idxc.replication_port }} -secret '{{ splunk.idxc.pass4SymmKey }}' -auth '{{ splunk.admin_user }}:{{ splunk.password }}'"
become: yes
become_user: "{{ splunk.user }}"
Expand All @@ -12,6 +12,22 @@
until: task_result.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
when: not splunk.idxc.replication_ssl | default(false) | bool
ignore_errors: yes
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"

- name: Set current node as indexer cluster peer (SSL replication)
command: "{{ splunk.exec }} edit cluster-config -mode slave -master_uri '{{ cert_prefix }}://{{ splunk.cluster_master_url }}:{{ splunk.svc_port }}' -secret '{{ splunk.idxc.pass4SymmKey }}' -auth '{{ splunk.admin_user }}:{{ splunk.password }}'"
become: yes
become_user: "{{ splunk.user }}"
register: task_result_ssl
changed_when: task_result_ssl.rc == 0
until: task_result_ssl.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
when: splunk.idxc.replication_ssl | default(false) | bool
ignore_errors: yes
notify:
- Restart the splunkd service
Expand Down
17 changes: 16 additions & 1 deletion roles/splunk_indexer/tasks/setup_multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set_fact:
multisite_master_uri: "{{ cert_prefix }}://{{ splunk.multisite_master }}:{{ splunk.svc_port }}"

- name: Setup Peers with Associated Site
- name: Setup Peers with Associated Site (non-SSL replication)
command: "{{ splunk.exec }} edit cluster-config -mode slave -site {{ splunk.site }} -master_uri {{ multisite_master_uri }} -replication_port {{ splunk.idxc.replication_port }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }}"
become: yes
become_user: "{{ splunk.user }}"
Expand All @@ -16,6 +16,21 @@
until: task_result.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
when: not splunk.idxc.replication_ssl | default(false) | bool
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"

- name: Setup Peers with Associated Site (SSL replication)
command: "{{ splunk.exec }} edit cluster-config -mode slave -site {{ splunk.site }} -master_uri {{ multisite_master_uri }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -secret {{ splunk.idxc.pass4SymmKey }}"
become: yes
become_user: "{{ splunk.user }}"
register: task_result_ssl
changed_when: task_result_ssl.rc == 0
until: task_result_ssl.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
when: splunk.idxc.replication_ssl | default(false) | bool
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"
Expand Down