alloy(role): pull in alloy role that works from fux #112

Merged
c6ristian merged 6 commits from fix/alloy into main 2026-07-23 20:34:03 +02:00
Owner
No description provided.
alloy(role): pull in alloy role that works from fux
All checks were successful
/ build (pull_request) Successful in 32s
/ Ansible Lint (push) Successful in 2m23s
/ Ansible Lint (pull_request) Successful in 2m25s
0b5fa03ac3
You can view your changes at https://staging.infra-docs.hamburg.ccc.de/pr112/
Owner

+555 -19211 👀

Das Review krieg ich erst nach der Kassenprüfung hin, sorry

scnr

**+555 -19211** 👀 Das Review krieg ich erst nach der Kassenprüfung hin, sorry _scnr_
c6ristian force-pushed fix/alloy from 0b5fa03ac3
All checks were successful
/ build (pull_request) Successful in 32s
/ Ansible Lint (push) Successful in 2m23s
/ Ansible Lint (pull_request) Successful in 2m25s
to 25bf4da29d
All checks were successful
/ build (pull_request) Successful in 28s
/ Ansible Lint (push) Successful in 3m9s
/ Ansible Lint (pull_request) Successful in 3m13s
2026-07-09 23:12:23 +02:00
Compare
june requested changes 2026-07-11 13:47:02 +02:00
Dismissed
june left a comment

Very nice moving away from the upstream role to a much simpler custom role!
Please see the comments and also please provide an argument_specs as well as a README, see the forgejo_runner roles README as well as the certbot roles README as references.

Very nice moving away from the upstream role to a much simpler custom role! Please see the comments and also please provide an argument_specs as well as a README, see the [`forgejo_runner` roles README](https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/branch/main/roles/forgejo_runner/README.md) as well as the [`certbot` roles README](https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/branch/main/roles/certbot/README.md) as references.
@ -0,0 +12,4 @@
- name: Run cache update
ansible.builtin.apt:
update_cache: true
Owner

This can be moved into the next step or is there a reason to have this in a separate step?

This can be moved into the next step or is there a reason to have this in a separate step?
Author
Owner

This is best practice to avoid conflicts

This is best practice to avoid conflicts
june marked this conversation as resolved
@ -20,1 +1,3 @@
when: alloy__additional_configs_dir is defined and alloy__additional_configs_dir != ""
---
- name: Deploy Grafana Alloy with config
tags: [ alloy ]
Owner

Let's leave the tags at the playbook level.

Let's leave the tags at the playbook level.
Owner

The tag is still here, we already have the alloy tag in the playbook, so it can just be removed.

The tag is still here, we already have the alloy tag [in the playbook](https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/branch/main/playbooks/deploy.yaml#L119-L125), so it can just be removed.
c6ristian marked this conversation as resolved
@ -23,2 +5,2 @@
ansible.builtin.apt:
name: rsync
- name: Install Alloy on Debian
when: ansible_facts['distribution'] == "Debian"
Owner

We only have the Debian case, so having this be distro-specific isn't needed. I would rather have this role just fail, if someone tries to run it on an unsupported platform, instead of just no alloy package existing being installed.

We only have the Debian case, so having this be distro-specific isn't needed. I would rather have this role just fail, if someone tries to run it on an unsupported platform, instead of just no `alloy` package existing being installed.
c6ristian marked this conversation as resolved
@ -0,0 +1,76 @@
---
- name: Install and Setup unpoller
Owner

Do we want/need unpoller support? If not, I would rather keep this role simpler and remove it.

Do we want/need unpoller support? If not, I would rather keep this role simpler and remove it.
c6ristian marked this conversation as resolved
- add README
- add argument_specs
- removed tags
alloy(role): remove unpoller support
All checks were successful
/ build (pull_request) Successful in 52s
/ Ansible Lint (pull_request) Successful in 2m55s
/ Ansible Lint (push) Successful in 3m4s
3f1108cf2c
june requested changes 2026-07-17 18:30:03 +02:00
Dismissed
june left a comment

Thanks for implementing the changes, some small comments.

Thanks for implementing the changes, some small comments.
@ -0,0 +9,4 @@
## Required Arguments
- `alloy_config_default`: The default Alloy configuration. Recomanded for configuration that hosts of a groupe share.
Owner

Recomanded -> Recommended

Recomanded -> Recommended
Owner

Since alloy_config_default has a default configuration set, it should be listed under Optional Arguments. I guess another option would be to truly have this as a required configuration and then just setting the config, which is quite specific to the Chaosknoten use case as a group var maybe?

Since `alloy_config_default` has a default configuration set, it should be listed under Optional Arguments. I guess another option would be to truly have this as a required configuration and then just setting the config, which is quite specific to the Chaosknoten use case as a group var maybe?
june marked this conversation as resolved
@ -0,0 +13,4 @@
## Optional Arguments
- `alloy_config_additional`: Additional Alloy configuration appended to the default config. Recomanded for per host configuration
Owner

Recomanded -> Recommended

Recomanded -> Recommended
june marked this conversation as resolved
@ -5,3 +8,3 @@
basic_auth {
username = "chaos"
password = "chaos_password"
password = "{{ metrics__chaos_password }}"
Owner

Maybe have this be an alloy variable which is documented in the README as well? See the comment in the README, if we move this config to the group vars then the this variable can be kept as is.

Maybe have this be an alloy variable which is documented in the README as well? See the comment in the README, if we move this config to the group vars then the this variable can be kept as is.
june marked this conversation as resolved
@ -0,0 +3,4 @@
options:
alloy_config_default:
type: str
required: true
Owner

This doesn't do anything as a default is provided.

This doesn't do anything as a default is provided.
june marked this conversation as resolved
alloy(role): remove alloy_config_default contents from role
All checks were successful
/ build (pull_request) Successful in 56s
/ Ansible Lint (pull_request) Successful in 3m28s
/ Ansible Lint (push) Successful in 3m36s
e8d05c6542
alloy_config_default should be set in group vars
june approved these changes 2026-07-18 00:43:22 +02:00
Dismissed
june left a comment

Awesome! Just the removing the tag remaining in the main.yaml and then we can merge this. :3

Awesome! Just the removing the tag remaining in the `main.yaml` and then we can merge this. :3
june requested changes 2026-07-18 00:43:47 +02:00
Dismissed
june left a comment

Oops, should have been a request changes :D

Oops, should have been a request changes :D
alloy(role): remove tags from role
All checks were successful
/ build (pull_request) Successful in 30s
/ Ansible Lint (pull_request) Successful in 2m36s
/ Ansible Lint (push) Successful in 2m37s
147737c7a2
june approved these changes 2026-07-22 21:50:22 +02:00
june left a comment

Nice, let's go!

Nice, let's go!
c6ristian force-pushed fix/alloy from 147737c7a2
All checks were successful
/ build (pull_request) Successful in 30s
/ Ansible Lint (pull_request) Successful in 2m36s
/ Ansible Lint (push) Successful in 2m37s
to 34f6cfc186
All checks were successful
/ build (pull_request) Successful in 29s
/ Ansible Lint (push) Successful in 3m52s
/ Ansible Lint (pull_request) Successful in 3m58s
/ cleanup-staging (pull_request) Successful in 6s
2026-07-23 20:30:00 +02:00
Compare
c6ristian scheduled this pull request to auto merge when all checks succeed 2026-07-23 20:30:36 +02:00
c6ristian scheduled this pull request to auto merge when all checks succeed 2026-07-23 20:32:54 +02:00
c6ristian scheduled this pull request to auto merge when all checks succeed 2026-07-23 20:34:01 +02:00
c6ristian deleted branch fix/alloy 2026-07-23 20:34:03 +02:00
Sign in to join this conversation.
No description provided.