Skip to content

Commit

Permalink
Allow splunk_nix user/group to be configurable as system user/group, …
Browse files Browse the repository at this point in the history
…pull splunk#203
  • Loading branch information
bpelaia committed Dec 27, 2023
1 parent 4b48c74 commit 8a2393f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/splunk/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ splunk_install_path: /opt # Base directory on the operating system to which splu
least_privileged: false # Do not change. This get automatically set in `tasks/main.yml` based on the version and install type.
splunk_nix_user: splunk
splunk_nix_group: splunk
splunk_nix_system_user: false # Whenther or not to create splunk nix user/group as a system user/group
local_os_user: false # Whenther or not to force creation of a user using the `luseradd` or not.
local_os_group: false # Whether or not to force creation of a group using the `lgroupadd` or not.
splunk_uri_lm: undefined
Expand All @@ -38,7 +39,7 @@ splunk_authenticationconf: authentication.conf.j2
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.
splunk_use_initd: false # If set to true, the system will use init.d. Default false
splunk_use_systemd: true # DO NOT EDIT. To use init.d, set `splunk_use_initd` to true.
splunk_force_kill: False
splunk_force_kill: false
systemd_unit_full: Splunkd # You can change this in `host_vars` or `group_vars` to customize the service name.
systemd_unit_uf: SplunkForwarder # You can change this in `host_vars` or `group_vars` to customize the service name.
splunk_disable_mgmt_port: false # If set to true, will disable splunkd management port during installation
Expand Down
2 changes: 2 additions & 0 deletions roles/splunk/tasks/install_splunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- name: Add nix splunk group
group:
name: "{{ splunk_nix_group }}"
system: "{{ splunk_nix_system_user }}"
state: present
local: "{{ local_os_group }}"
become: true
Expand All @@ -17,6 +18,7 @@
name: "{{ splunk_nix_user }}"
group: "{{ splunk_nix_group }}"
home: "{{ splunk_home }}"
system: "{{ splunk_nix_system_user }}"
state: present
shell: /bin/bash
local: "{{ local_os_user }}"
Expand Down

0 comments on commit 8a2393f

Please sign in to comment.