Skip to content

Commit 7cdb092

Browse files
author
Mason Morales
committed
Add general pass4SymmKey configuration to configure_license.yml
1 parent 1fb350d commit 7cdb092

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

roles/splunk/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ splunk_uri_cm: undefined
1818
splunk_uri_ds: undefined # e.g. mydeploymentserver.mydomain.com:8089 ; Note that you must also configure the clientName var under either group_vars or host_vars for deploymentclient.conf to be configured
1919
clientName: undefined
2020
phoneHomeIntervalInSecs: undefined
21+
splunk_general_key: undefined # Configures a pass4SymmKey in server.conf under the general stanza
2122
splunk_ds_key: undefined # Configures a pass4SymmKey in server.conf for authenticating against a deployment server
2223
splunk_admin_username: admin
2324
splunk_admin_password: undefined # Use ansible-vault encrypt_string, e.g. ansible-vault encrypt_string --ask-vault-pass 'var_value_to_encrypt' --name 'var_name'

roles/splunk/tasks/configure_license.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Set license master_uri
2+
- name: Set license master_uri in server.conf
33
ini_file:
44
path: "{{ splunk_home }}/etc/system/local/server.conf"
55
section: license
@@ -13,3 +13,18 @@
1313
when:
1414
- "'full' in group_names"
1515
- splunk_uri_lm != 'undefined'
16+
17+
- name: Set pass4SymmKey in the general stanza of server.conf
18+
ini_file:
19+
path: "{{ splunk_home }}/etc/system/local/server.conf"
20+
section: general
21+
option: pass4SymmKey
22+
value: "{{ splunk_general_key }}"
23+
owner: "{{ splunk_nix_user }}"
24+
group: "{{ splunk_nix_group }}"
25+
mode: 0644
26+
become: true
27+
notify: restart splunk
28+
when:
29+
- "'full' in group_names"
30+
- splunk_general_key != 'undefined'

0 commit comments

Comments
 (0)