Skip to content

feat(infra): list the roles of the pinned collections in onboard - #6699

Merged
dan-petty merged 6 commits into
mainfrom
feat/6678-onboard-collection-roles
Nov 21, 2026
Merged

dan-petty merged 6 commits into
mainfrom
feat/6678-onboard-collection-roles

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

The roles row of devops infra onboard now also lists the roles of the pinned collections. Onboarding installs the collections of collections/requirements.yml into a temporary folder with ansible-galaxy collection install. Then ansible-doc -t role -l -j lists the roles of that folder only. The row adds each role that names a collection, by its full name. A role shows only when it has an argument spec.

With no ansible-doc in the Ansible tool environment, onboarding starts no install. The row keeps the roles of the role folders, and its reason says why. A failed install or listing keeps them too, and the reason names the error.

The install helper moves from plan.py to ansible_facts.py, because plan.py imports onboard.py.

The docs inventory classes the Markdown of tests/fixtures/infra/collections/ as records, so the README of the test collection is not a hand-written document.

Closes #6678

Change: openspec/changes/archive/2026-11-21-6678-onboard-collection-roles/

@dan-petty dan-petty added type/feature Type feature: a new function scope/infra Docker container images, DevContainers, and infrastructure tooling labels Nov 21, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review points for #6678:

  • Acceptance criterion 3 needs dan-petty/homelab#76 merged, and argument specs in dan_petty.infra (feat(ansible): ship the nvidia, gvisor and cpu_tuning roles infra#7, feat(ansible): ship the common role and the generic plays infra#8). Then run uv run devops infra onboard dan-petty/homelab in a devops-cli checkout. The roles row must list dan_petty.infra.nvidia.
  • Onboarding of a repo with collections/requirements.yml now downloads its collections from Galaxy or from their git sources on each run, into a temporary folder (the issue asks for a temporary path). It does not use the kept install of plan under <data dir>/infra/collections/.
  • ansible-doc lists only the roles that have meta/argument_specs.yml. A role of a collection with no argument spec does not show in the row.
  • PATH: in the devcontainer, ansible-runner is on PATH, and its tool environment (ansible-core 2.22.0) holds ansible-doc and ansible-galaxy. The CI runner image ubuntu-26.04 (image version 20261116.202.1) lists Ansible 2.21.6. The tests start no real Ansible on either host: ProcessFake answers ansible-galaxy and ansible-doc, and the fake shutil.which finds them, so the tests do the same on both hosts.
  • The fixture listing tests/fixtures/infra/ansible_roles.json is real output of ansible-core 2.22.0 after ansible-galaxy collection build and install of the fixture collection. tests/support/infra.py gives the steps to record it again.
  • I filed fix(infra): onboard, plan and apply read one requirements file #6698: the collections row accepts collections/requirements.yaml, but plan, apply and this install read only collections/requirements.yml. Intake made fix(infra): onboard, plan and apply read one requirements file #6698 a sub-issue of feat(infra): list the roles of installed collections in onboard #6678 because of its source link.

)

The docs inventory classes tests/fixtures/infra/collections/**/*.md as
records, so the README of the fixture collection is not a hand-written
document that must be within two links of AGENTS.md.
@dan-petty
dan-petty marked this pull request as ready for review November 21, 2026 22:36
@dan-petty
dan-petty merged commit 6ad9f17 into main Nov 21, 2026
32 checks passed
@dan-petty
dan-petty deleted the feat/6678-onboard-collection-roles branch November 21, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/infra Docker container images, DevContainers, and infrastructure tooling type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(infra): list the roles of installed collections in onboard

1 participant