grafana-ansible-collection
grafana-ansible-collection copied to clipboard
Allow alloy_user_groups variable again
Hello
Please review this change:
The {{ [ service_group ] + alloy_user_groups } was replaced to {{ alloy_service_group }} instead of {{ [ alloy_service_group ] + alloy_user_groups }} in c9000d1106232916440b7d26c7da8f98fb5367b2.
Commit c9000d1106232916440b7d26c7da8f98fb5367b2 broke #212 see comments:
- 2388057978 and
- 2388112265
Thanks and have a nice day.
This should probably be a priority, https://github.com/grafana/grafana-ansible-collection/pull/209 introduced a regression that breaks support for extra groups. As a result, alloy is unable to extract certain logs at the same time, such as those from docker and some of /var/log, which require groups docker and adm respectively.
This doesn't work...
"msg": "Group ['alloy', 'adm', 'docker'] does not exist"
It has to be something like
- name: Create alloy user
ansible.builtin.user:
name: "{{ alloy_service_user }}"
group: "{{ alloy_service_group }}"
groups: "{{ alloy_user_groups | join(',') }}"
system: true
create_home: false # Appropriate for a system user, usually doesn't need a home directory
become: true
you can't pass a list of groups into the group: input. It needs to go into groups: