6 Commits

Author SHA1 Message Date
04179b04eb fix vars 2026-07-17 12:48:46 +03:00
5cac062a21 variables add port 2026-07-17 12:33:54 +03:00
45f51b67b1 add tests for ubuntu + task: apt update 2026-07-17 12:24:02 +03:00
09ffb32784 Merge pull request #5 from mondrunov-genlab/add-gitlab-role
fix install (retries, until, delay), add deleting tmp-files and fix permissions for alloy.service
2026-07-16 17:17:37 +03:00
6fccc69e03 Merge branch 'master' into add-grafana-alloy-role 2026-07-08 13:30:44 +03:00
bafa282482 Add grafana_alloy role: scrape log files to Loki 2026-07-06 13:07:50 +03:00
4 changed files with 16 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
grafana_alloy_version: "1.17.1"
grafana_alloy_config_dir: "/etc/alloy"
grafana_alloy_data_dir: "/var/lib/alloy"
grafana_alloy_ui_port: 12345
grafana_alloy_loki_port: 3100
grafana_alloy_loki_url: "http://localhost:{{ grafana_alloy_loki_port }}/loki/api/v1/push"
grafana_alloy_log_paths:

View File

@@ -15,6 +15,15 @@ platforms:
cgroupns_mode: host
privileged: true
- name: ubuntu
image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2404}-ansible:latest
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
provisioner:
name: ansible

View File

@@ -30,7 +30,7 @@
# kics-scan ignore-block
- name: "Check if Alloy is ready"
ansible.builtin.uri:
url: "http://localhost:12345/-/ready"
url: "http://localhost:{{ grafana_alloy_ui_port }}/-/ready"
return_content: true
status_code: 200
method: GET

View File

@@ -37,6 +37,11 @@
fail_msg: "alloy version {{ grafana_alloy_version }} is not installed or not working correctly"
rescue:
- name: "Install | Update apt cache on Debian"
ansible.builtin.apt:
update_cache: true
when: ansible_facts["os_family"] == "Debian"
- name: "Install | Ensure unzip is present"
ansible.builtin.package:
name: "unzip"