diff --git a/roles/splunk/defaults/main.yml b/roles/splunk/defaults/main.yml index e884d5a5..40a44a4e 100644 --- a/roles/splunk/defaults/main.yml +++ b/roles/splunk/defaults/main.yml @@ -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 diff --git a/roles/splunk/tasks/install_splunk.yml b/roles/splunk/tasks/install_splunk.yml index b1b63988..846e80b9 100644 --- a/roles/splunk/tasks/install_splunk.yml +++ b/roles/splunk/tasks/install_splunk.yml @@ -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 @@ -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 }}"