fix(container): honor PROXMOX_NODE across role tasks#303
Open
j551n-ncloud wants to merge 3 commits intostevius10:developfrom
Open
fix(container): honor PROXMOX_NODE across role tasks#303j551n-ncloud wants to merge 3 commits intostevius10:developfrom
j551n-ncloud wants to merge 3 commits intostevius10:developfrom
Conversation
Author
|
sorry for writing description with ai slop im working currently :C |
There was a problem hiding this comment.
Pull request overview
This PR fixes Proxmox node selection in the container Ansible role so the configured PROXMOX_NODE is propagated consistently through both module defaults and direct API uri calls, avoiding accidental fallback to a hardcoded pve node.
Changes:
- Resolves and sets
PROXMOX_NODEduring environment/config fact setup in the container role. - Updates Proxmox module defaults to use the resolved node (with a safe fallback for empty values).
- Updates multiple Proxmox API URL templates to use
default('pve', true)so empty node values don’t produce empty URL path segments.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
base/roles/container/tasks/env.yml |
Adds PROXMOX_NODE to the role’s env/config resolution so downstream tasks share a single resolved node value. |
base/roles/container/defaults/main.yml |
Removes hardcoded node: "pve" and defers to PROXMOX_NODE with a safe fallback. |
base/roles/container/tasks/main.yml |
Uses the stronger default filter for node in the node-scoped /status API call. |
base/roles/container/tasks/start.yml |
Uses the stronger default filter for node in the container config polling URL. |
base/roles/container/tasks/remove.yml |
Uses the stronger default filter for node in stop/removal polling URLs. |
base/roles/container/tasks/os.yml |
Uses the stronger default filter for node in OS download and content polling URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PROXMOX_NODEhandling in the container role so configured node values are consistently used.pve.Problem
PROXMOX_NODEwas defined in configuration, but not fully propagated through the role execution path:node: "pve".This could cause API calls to hit the wrong Proxmox node.
Changes
PROXMOX_NODEto env fact resolution inbase/roles/container/tasks/env.yml.PROXMOX_NODE | default('pve', true)inbase/roles/container/defaults/main.yml.default('pve', true)in:base/roles/container/tasks/main.ymlbase/roles/container/tasks/start.ymlbase/roles/container/tasks/remove.ymlbase/roles/container/tasks/os.ymlWhy This Fix
Using
default('pve', true)ensures empty values are treated as missing and fall back safely.Resolving
PROXMOX_NODEfrom config/env in one place avoids drift between task paths.Scope and Safety
container.envglobals.jsonlocal/config.jsonValidation
Commit
0fa7aa8- fix(container): honor PROXMOX_NODE across role tasks