feat(semaphore): trigger Ansible tasks at booking start/end via Semaphore

- Background scheduler checks every 30s for bookings that need setup or teardown
- Per-lab Semaphore template IDs stored on the labs table
- Booking flags track which jobs have been triggered and their Semaphore job IDs
- Immediate teardown triggered when an active booking is cancelled
- Settings UI section for Semaphore API URL, token, and project ID
- Lab template form fields for setup/teardown template IDs
- BookingDetailsModal shows live Ansible job status with manual trigger buttons
This commit is contained in:
Brückner
2026-06-05 09:39:58 +02:00
parent 11eb06c5ad
commit 70399a00ec
6 changed files with 488 additions and 24 deletions

View File

@ -34,6 +34,8 @@ export interface LabTemplate {
location: string;
deviceIds: string[];
topology: TopologyLink[];
semaphoreSetupTemplateId?: string;
semaphoreTeardownTemplateId?: string;
}
export interface Booking {
@ -46,6 +48,10 @@ export interface Booking {
status: 'active' | 'upcoming' | 'completed' | 'cancelled';
notified: boolean;
emailSent?: boolean;
ansibleSetupTriggered?: boolean;
ansibleTeardownTriggered?: boolean;
ansibleSetupJobId?: string;
ansibleTeardownJobId?: string;
}
export interface LogEntry {