Skip to content

feat(inventory): B2: serve an environment's inventory from canopy - #523

Open
dannash100 wants to merge 11 commits into
mainfrom
feat/canopy-inventory
Open

feat(inventory): B2: serve an environment's inventory from canopy#523
dannash100 wants to merge 11 commits into
mainfrom
feat/canopy-inventory

Conversation

@dannash100

@dannash100 dannash100 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-09-01 at 9 27 30 AM

Ansible reads each environment's servers and variables from a file nothing keeps in step with canopy, and that file holds the salts and enrolment tokens in the clear.

  • POST /api/inventory/for_group, by group name or id plus a rank: live servers with product, kind, rank, address, vars.
  • Vars are the server's tags over its group's; true/false and JSON arrays decode, everything else stays text.
  • Secret vars go to the secret store rather than to tags, scoped to an environment or one server. A name is a tag or a secret, never both, refused either way round.
  • Admin-only now, and refused outright when a value can't be read rather than served a member short of one.
  • The response marks which vars are secret, so the ansible cache can drop them (beyondessential/ops#290).

Spec: .workhorse/specs/private-server/inventory.md. It links GRP, so #524 wants to land first. The ansible side is beyondessential/ops#290.

QA

Inventory from canopy

@dannash100 dannash100 changed the title feat(inventory): B2: serve a deployment's inventory from canopy feat(inventory): B2: serve an environment's inventory from canopy Aug 30, 2026

## Secrets

An inventory carries no secret.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, that's a problem, because there's secrets in the variables. so can't use that design

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh true that my bad

@dannash100
dannash100 marked this pull request as draft August 31, 2026 20:50
@dannash100
dannash100 marked this pull request as ready for review August 31, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants