Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow alloy_user_groups variable again #276

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

pjezek
Copy link
Contributor

@pjezek pjezek commented Oct 2, 2024

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.

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2024

CLA assistant check
All committers have signed the CLA.

@PabloEForgeFlow
Copy link

This should probably be a priority, #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.

@ishanjainn ishanjainn merged commit ecdb42f into grafana:main Oct 15, 2024
12 of 17 checks passed
@sepulworld
Copy link

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:

@@ -13,7 +13,7 @@
- name: Create alloy user
ansible.builtin.user:
name: "{{ alloy_service_user }}"
group: "{{ alloy_service_group }}"
group: "{{ [ alloy_service_group ] + alloy_user_groups }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be groups:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants