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:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user