Closed skevas closed 2 years ago
@saravanan30erd any thoughts?
@skevas yes, we can use variables to provide user & group instead of hardcoded values. I will do it once ubuntu and amazon linux support PR is merged. @peterzhuamazon please change the label into enhancement as its not bug.
This is a bug if you are setting the os_user variable to anything but opensearch. In this case, systemd service will fail with something like "Failed to determine user credentials".
@skevas Agree, I completely missed the part that os_user
used on user creation tasks, and not here. Will fix it.
Changing the label without reading the last two comments, it is bug
again after all 😅
@saravanan30erd as discussed the AL2 and Ubuntu changes are in, I will assign you as the owner of this issue for now.
Thanks.
Describe the bug
Hard coded user and group in service templates dashboards.service and opensearch.service.
To Reproduce
-
Expected behavior
Use settings from inventories/opensearch/group_vars/all/all.yml
Playbook Name
Opensearch and Dashboards
Screenshots
-
Host/Environment (please complete the following information):
Any
Additional context
-
Solution
Add {{ os_group }} to inventories/opensearch/group_vars/all/all.yml and replace constants in service files with {{ os_user }} and {{ os_group }}. Further recommendation: Introduce {{ dashboards_user }} and {{ dashboards_groups }}