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
22 changes: 22 additions & 0 deletions docs/advanced/default.yml.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,29 @@ splunk:
* pass4SymmKey: thisisasecret
* - url: https://master.us-east.corp.net:8089
* pass4SymmKey: thisisanothersecret

manual_monitor_list: <list>
* List of other splunk instances that a monitoring console should monitor in addition to automatically added servers from other groups.
* Default: []
* Example:
* manual_monitor_list:
* - extra-server-1.example.org
* - extra-server-2.example.org
* - different-auth-server-1.example.org
* - different-auth-server-2.example.org

remote-credentials: <dict>
* List of credentials for splunk servers that don't match the defaults
* Default: {}
* Example:
* remote-credentials:
* different-auth-server-1.example.org:
* admin_user: my-adm-user
* admin_password: my-adm-password
* different-auth-server-2.example.org:
* admin_user: my-adm-user
* admin_password: my-adm-password

deployer_url: null
* Hostname of Splunk Enterprise deployer instance. May be overridden using SPLUNK_DEPLOYER_URL environment variable.
* Default: null
Expand Down
4 changes: 2 additions & 2 deletions roles/splunk_monitor/tasks/adding_peers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

- name: Create list of peers
set_fact:
group_list: "{{ (groups['splunk_indexer'] | default([])) + (groups['splunk_search_head'] | default([])) + (groups['splunk_search_head_captain'] | default([])) + (groups['splunk_cluster_master'] | default([])) + (groups['splunk_deployment_server']| default([])) + (groups['splunk_license_master'] | default([])) + (groups['splunk_standalone'] | default([])) }}"
group_list: "{{ (groups['splunk_indexer'] | default([])) + (groups['splunk_search_head'] | default([])) + (groups['splunk_search_head_captain'] | default([])) + (groups['splunk_cluster_master'] | default([])) + (groups['splunk_deployment_server']| default([])) + (groups['splunk_license_master'] | default([])) + (groups['splunk_standalone'] | default([])) + (splunk['manual_monitor_list'] | default([])) }}"

- name: Fetch existing peers
splunk_api:
Expand Down Expand Up @@ -88,7 +88,7 @@
with_items: "{{ group_list }}"

- name: Set search peers
command: "{{ splunk.exec }} add search-server {{ cert_prefix }}://{{ item }}:{{ splunk.svc_port }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -remoteUsername {{ splunk.admin_user }} -remotePassword {{ splunk.password }}"
command: "{{ splunk.exec }} add search-server {{ cert_prefix }}://{{ item }}:{{ splunk.svc_port }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -remoteUsername {{ splunk['remote-credentials'][item]['admin_user'] | default(splunk.admin_user) }} -remotePassword {{ splunk['remote-credentials'][item]['admin_password'] | default(splunk.password) }}"
become: yes
become_user: "{{ splunk.user }}"
register: set_as_peer
Expand Down