Skip to content

Commit 8a2393f

Browse files
committed
Allow splunk_nix user/group to be configurable as system user/group, pull splunk#203
1 parent 4b48c74 commit 8a2393f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

roles/splunk/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ splunk_install_path: /opt # Base directory on the operating system to which splu
1616
least_privileged: false # Do not change. This get automatically set in `tasks/main.yml` based on the version and install type.
1717
splunk_nix_user: splunk
1818
splunk_nix_group: splunk
19+
splunk_nix_system_user: false # Whenther or not to create splunk nix user/group as a system user/group
1920
local_os_user: false # Whenther or not to force creation of a user using the `luseradd` or not.
2021
local_os_group: false # Whether or not to force creation of a group using the `lgroupadd` or not.
2122
splunk_uri_lm: undefined
@@ -38,7 +39,7 @@ splunk_authenticationconf: authentication.conf.j2
3839
splunk_create_polkit: 0 # If set to 1 `enable boot-start` will create a polkit rules file allowing the 'splunk_nix_user' to restart the splunk service without authentication.
3940
splunk_use_initd: false # If set to true, the system will use init.d. Default false
4041
splunk_use_systemd: true # DO NOT EDIT. To use init.d, set `splunk_use_initd` to true.
41-
splunk_force_kill: False
42+
splunk_force_kill: false
4243
systemd_unit_full: Splunkd # You can change this in `host_vars` or `group_vars` to customize the service name.
4344
systemd_unit_uf: SplunkForwarder # You can change this in `host_vars` or `group_vars` to customize the service name.
4445
splunk_disable_mgmt_port: false # If set to true, will disable splunkd management port during installation

roles/splunk/tasks/install_splunk.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- name: Add nix splunk group
99
group:
1010
name: "{{ splunk_nix_group }}"
11+
system: "{{ splunk_nix_system_user }}"
1112
state: present
1213
local: "{{ local_os_group }}"
1314
become: true
@@ -17,6 +18,7 @@
1718
name: "{{ splunk_nix_user }}"
1819
group: "{{ splunk_nix_group }}"
1920
home: "{{ splunk_home }}"
21+
system: "{{ splunk_nix_system_user }}"
2022
state: present
2123
shell: /bin/bash
2224
local: "{{ local_os_user }}"

0 commit comments

Comments
 (0)