mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-10-31 19:11:03 +00:00
Compare commits
2 commits
7683f8c7ea
...
b781301edf
| Author | SHA1 | Date | |
|---|---|---|---|
| b781301edf | |||
| 72970e7675 |
4 changed files with 34 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
alloy_version: "1.19.2-1"
|
||||
|
||||
alloy_user: alloy
|
||||
alloy_group: alloy
|
||||
alloy_state_dir: /var/lib/alloy
|
||||
|
||||
alloy_collector_id: "{{ inventory_hostname }}"
|
||||
|
||||
alloy_fleet_management_url: https://fleet-management-prod-023.grafana.net
|
||||
|
|
|
|||
|
|
@ -24,6 +24,26 @@
|
|||
name: "alloy={{ alloy_version }}"
|
||||
state: present
|
||||
|
||||
# Alloy ran as root until 1.19 and its state is still root-owned, so the
|
||||
# service user can't write its own WAL or positions.yml and every remotecfg
|
||||
# pipeline fails to build.
|
||||
- name: Find Alloy state not owned by the service user
|
||||
ansible.builtin.command: find {{ alloy_state_dir }} ! -user {{ alloy_user }} -print -quit
|
||||
register: alloy_foreign_state
|
||||
changed_when: alloy_foreign_state.stdout | length > 0
|
||||
check_mode: false
|
||||
failed_when: false
|
||||
|
||||
- name: Fix ownership of Alloy state
|
||||
ansible.builtin.file:
|
||||
path: "{{ alloy_state_dir }}"
|
||||
state: directory
|
||||
owner: "{{ alloy_user }}"
|
||||
group: "{{ alloy_group }}"
|
||||
recurse: true
|
||||
when: alloy_foreign_state.stdout | length > 0
|
||||
notify: Restart alloy
|
||||
|
||||
- name: Deploy Alloy configuration
|
||||
ansible.builtin.template:
|
||||
src: config.alloy.j2
|
||||
|
|
|
|||
|
|
@ -311,3 +311,12 @@ crabitalontap.com {
|
|||
root * /srv/crabitalontap.com
|
||||
file_server
|
||||
}
|
||||
|
||||
# Status page
|
||||
updog.pez.sh {
|
||||
tracing {
|
||||
span updog
|
||||
}
|
||||
root * /srv/updog
|
||||
file_server
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ resource "hcloud_zone_rrset" "A_helsinki_a" {
|
|||
"@", "apps", "auth", "bitwarden", "copenhagen-a", "download", "git", "helsinki-a",
|
||||
"jellyfin", "jellyfin-requests", "*.cph", "*.lon", "ldap", "lidarr", "london-a", "music", "naveen",
|
||||
"n8n", "plex", "prowlarr", "radarr", "readarr", "request",
|
||||
"sonarr", "soulseek", "status", "ui",
|
||||
"sonarr", "soulseek", "status", "ui", "updog",
|
||||
])
|
||||
zone = hcloud_zone.pezsh.name
|
||||
name = each.value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue