grafana-ansible-collection icon indicating copy to clipboard operation
grafana-ansible-collection copied to clipboard

Allow alloy_user_groups variable again

Open pjezek opened this issue 1 year ago • 1 comments

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:

Thanks and have a nice day.

pjezek avatar Oct 02 '24 09:10 pjezek

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 02 '24 09:10 CLAassistant

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.

PabloEForgeFlow avatar Oct 10 '24 08:10 PabloEForgeFlow

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:

sepulworld avatar Oct 19 '24 08:10 sepulworld