Initial commit

This commit is contained in:
2026-02-21 16:54:18 +01:00
commit 0cf33cd95b
80 changed files with 8042 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
---
- name: Create exporter directory
file:
path: "{{ exporter_install_dir }}"
state: directory
mode: '0755'
- name: Deploy exporter configuration
template:
src: exporter-config.json.j2
dest: /etc/wg-lab-exporter/config.json
mode: '0644'
- name: Create systemd service
template:
src: wg-lab-exporter.service.j2
dest: /etc/systemd/system/wg-lab-exporter.service
- name: Enable and start exporter
systemd:
name: wg-lab-exporter
enabled: yes
state: started
daemon_reload: yes

View File

@@ -0,0 +1,8 @@
{
"labs": {
"{{ gateway_config.lab_name }}": {
"vni": {{ gateway_config.vni }},
"lab_if": "{{ gateway_config.lab_if }}"
}
}
}

View File

@@ -0,0 +1,11 @@
[Unit]
Description=WireGuard Lab Exporter
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/wg-lab-exporter/wg_lab_exporter.py
Restart=always
[Install]
WantedBy=multi-user.target