dettonville.llm.vllm_api module – Manage and query vLLM server states via API

Note

This module is part of the dettonville.llm collection (version 2026.8.2).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dettonville.llm.

To use it in a playbook, specify: dettonville.llm.vllm_api.

New in dettonville.llm 2.20.0

Synopsis

  • Checks health, models, version, and metrics from a specified vLLM server endpoint.

Parameters

Parameter

Comments

action

string

Action to perform.

Choices:

  • "health" ← (default)

  • "models"

  • "health" ← (default)

  • "version"

  • "metrics"

api_auth_type

string

Type of HTTP authentication header to use.

Choices:

  • "bearer" ← (default)

  • "basic"

api_key

string

Optional API token/key for authentication.

url

aliases: endpoint

string / required

Base URL of the vLLM API service.

use_system_certs

boolean

Whether to use the truststore library.

Choices:

  • false

  • true ← (default)

validate_certs

boolean

Whether to validate SSL certificates for HTTPS requests.

Choices:

  • false

  • true ← (default)

Examples

- name: Check health of vLLM server
  dettonville.llm.vllm_api:
    url: "https://vllm.example.com"
    action: "health"

- name: List models on vLLM server
  dettonville.llm.vllm_api:
    url: "https://vllm.example.com"
    action: "models"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

base_url

string

The target endpoint URL used.

Returned: always

changed

boolean

Whether any modification or state change occurred.

Returned: always

status

any

The JSON response dictionary or message returned from the API.

Returned: always

Authors

  • Lee Johnson (@lj020326)