ansible-role-for-splunk icon indicating copy to clipboard operation
ansible-role-for-splunk copied to clipboard

Explicit Group Init in Boot Config

Open arcsector opened this issue 2 years ago • 2 comments

Summary

Had to rebase a bit since my commits weren't attributed to my user, but the only commit needed is the last one. Essentially I'm just adding the -group flag to the boot start command since it's not there currently, and that causes some drift from the expected configs of the file permissions.

Changes

Changed roles/splunk/tasks/configure_splunk_boot.yml to include -group {{ splunk_nix_group }}

arcsector avatar Oct 11 '22 18:10 arcsector

~~Good suggestion. I tested this, and it seems that when you restart the splunk service, it gets set to the primary group the splunk_nix_user is set to. the splunk_nix_group is only set as an additional group to that user. The primary group is automatically set by the OS to the same of the user name when the user is created initially.~~

~~Some further research is needed to get this straightened out.~~

My bad. I tested it after the user was already created. This seems to work fine if the user does not exist.

dtwersky avatar Oct 24 '22 13:10 dtwersky

Awesome - thanks.

arcsector avatar Oct 24 '22 21:10 arcsector

Now I'm thinking if this should have been group instead of groups.

jewnix avatar Oct 25 '22 22:10 jewnix

It definitely should be, but the issue with the splunk init boot config still requires a patch. I can add it to the PR if you'd like.

arcsector avatar Oct 25 '22 23:10 arcsector