πŸ› οΈ Semaphore UI Setup – Role Overview

The semaphoreui_setup role installs and configures Semaphore UI with optional Entra ID OIDC integration.

Primary role metadata:

Main responsibilities:


πŸ’» Supported Hosts

Primary host group: semaphore

Deployment mode:

Main deploy playbook:

Deployment role chain:

  1. global
  2. sshpass
  3. autofs
  4. azure_cli_setup
  5. entra_id_oauth2
  6. semaphoreui_setup

πŸ” Entra ID / OIDC Integration

Entra app registration and secret generation run before semaphoreui_setup.

Entra registration logic:

Registration process:

  1. Resolve redirect URI from site config by priority:
    • app_redirect_url
    • oauth2_callback_url (legacy)
  2. Create app if missing
  3. Update redirect URIs for existing apps
  4. Rotate app secret
  5. Inject oauth2_client_id and oauth2_client_secret into rproxy_setup_sites

πŸ“‚ Inventory Structure (Semaphore)

Semaphore inventory config:

Site block contains:


βš™οΈ Role Execution Structure

Role entrypoint:

Execution flow:

  1. install.yml
  2. configure.yml
  3. runner.yml (when remote runner enabled)

Config rendering:

OIDC values sourced from:


πŸ“Œ Setup API Mode (Project/Template/Schedule Management)

API setup entrypoint:

Handles:

Setup tasks:


πŸ”„ Auth/Data Flow

  1. Inventory provides semaphore site entry with app_redirect_url
  2. entra_id_oauth2 registers or updates Entra app redirect URI
  3. entra_id_oauth2 rotates secret and injects oauth2_client_id/oauth2_client_secret into rproxy_setup_sites
  4. semaphoreui_setup reads injected values and renders config.json OIDC provider settings
  5. Semaphore sign-in uses configured redirect URI

βœ… Operator Notes