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

Update Alloy variables to use the grafana_alloy_ namespace so they are unique #209

Merged
merged 9 commits into from
Oct 1, 2024

Conversation

Aethylred
Copy link
Contributor

This should address #206 and #194

This PR should make sure the Alloy variables are unique and won't clash with other variables (like version) used elsewhere in playbooks.

It also moves the binary and working directory out of /etc where RHEL and SELinux get upset about.

@CLAassistant
Copy link

CLAassistant commented May 21, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@v-zhuravlev v-zhuravlev left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Collaborator

@gardar gardar left a comment

Choose a reason for hiding this comment

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

Please prefix the variables with alloy_ rather than grafana_alloy_ to comply with the ansible-lint rule var-naming[no-role-prefix] as the role name is alloy and not grafana_alloy

roles/alloy/defaults/main.yml Outdated Show resolved Hide resolved
@ishanjainn
Copy link
Member

ishanjainn commented Jun 3, 2024

Hey @Aethylred Yeah would prefer to use alloy_ instead of grafana_alloy_

@Aethylred
Copy link
Contributor Author

Aethylred commented Jul 12, 2024

Switched to alloy_ as requested, though I suppose the code is ahead of this now.

Apologies about the delay, with the Alloy setup being immature, we switched to using the standard Grafana setup. Will be skipping Grafana Agent & Flow and waiting for Alloy.

@ishanjainn
Copy link
Member

#228

BOth of the PRs seem to achive the same thing, @Aethylred Lemme know if the other PR loogs good to you aswell and we can use that or the other way around?

@Aethylred
Copy link
Contributor Author

Looking at #228 and it looks good, I'd consider it a duplicate, but whichever crosses the line first is fine by me

@Aethylred
Copy link
Contributor Author

Rebased on main. Not sure how to resolve the workflow errors.

@PabloEForgeFlow
Copy link

Any updates on this one? Looks like the only thing missing is approval for workflows to run

@ishanjainn
Copy link
Member

Changes LGTM, Ill just test on local by tomorrow and merge release if all good

@doyl54
Copy link

doyl54 commented Sep 30, 2024

Hello ! Do you have any updates on this MR ? When will it be merge ? I don't know the process here

It looks like @ishanjainn is pending reviewer

@Aethylred
Copy link
Contributor Author

Looking at those failed checks and I'm unsure if the problem is my MR, should I rebase again?

@ishanjainn
Copy link
Member

Dont think so it related to your changes, Chnages LGTM

@ishanjainn ishanjainn merged commit c9000d1 into grafana:main Oct 1, 2024
12 of 17 checks passed
@pjezek
Copy link
Contributor

pjezek commented Oct 2, 2024

Hello @ishanjainn
Thanks for merging. Please review comment: 2388057978, because it broke #212!

It reverts this:

git diff 8dbd124a04d2d68689fa7fa3be91db3b077b7589 install.yml
index b78a953..d39c97b 100644
--- a/roles/alloy/tasks/install.yml
+++ b/roles/alloy/tasks/install.yml
@@ -6,37 +6,55 @@
...
 - name: Create alloy user
   ansible.builtin.user:
-    name: "{{ service_user }}"
-    groups: "{{ [ service_group ] + alloy_user_groups }}"
+    name: "{{ alloy_service_user }}"
+    group: "{{ alloy_service_group }}"
     system: true
     create_home: false  # Appropriate for a system user, usually doesn't need a home directory
   become: true
...

The {{ [ service_group ] + alloy_user_groups } was replaced to {{ alloy_service_group }} instead of {{ [ alloy_service_group ] + alloy_user_groups }}

I added MR 276.

Thanks in advance

pjezek added a commit to pjezek/grafana-ansible-collection that referenced this pull request Oct 2, 2024
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.

9 participants