pmg_apt_repository_add
Add a standard repository to a PMG node's APT configuration. Uses dry-run planning by default; confirm to execute. Supports digest for conflict detection.
Instructions
MUTATION: add a standard repository to the configuration on a PMG node.
RISK_MEDIUM: adds a new package source — affects the NEXT upgrade's package provenance. CAPTURE: reads current repository state before planning (also readable directly via pmg_apt_repositories_get); if unreadable -> complete=False. No automatic revert: removing an added repository requires pmg_apt_repository_set to disable the resulting entry (there is no repository-delete endpoint). Proxmox's API deliberately does not expose upgrade execution; the upgrade itself happens at your console. This tool governs repo config only. Dry-run by default (returns a PLAN); confirm=True executes (PUT, Smoke-confirm) and returns {"status": "ok", "result": None}. Needs PROXIMO_PMG_* config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | PMG node name; defaults to the configured node if omitted. | |
| digest | No | Expected content digest of the repositories file, for optimistic-concurrency conflict detection. | |
| handle | Yes | Handle identifying the standard repository to add (as returned by pmg_apt_repositories_get's standard-repos list, e.g. 'no-subscription'). | |
| confirm | No | False (default) returns a dry-run PLAN only; True executes the addition. | |
| proximo_target | No | Which configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |