Repository navigation
feat(examples): ship the inventory templates in collection-fleet - #156
Merged
Merged
Conversation
The Galaxy quickstart copied examples/collection-fleet/ and then reached back into ansible/inventory/ for the hosts example, group_vars/ and host_vars/, whose comments were written for this repo (make targets, a git-ignored hosts.yml). The fleet example now carries its own inventory/: group_vars/ and host_vars/ identical to ansible/inventory/'s, and hosts-*.yml.example files with a fleet header over the same body. The hosts examples' bodies drop make targets and roles/ paths so one text reads right in both places, and make test-scripts keeps the two copies equal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups. The drift check could pass while comparing nothing (a failing git or sed inside a process substitution, renamed directories, a hosts example without the blank line ending its header). It now runs each git on its own line, compares every tracked file, requires comment-only headers and non-empty bodies, checks the ignore rules, and runs eleven negative cases on a fixture; both hosts examples must also parse to the same inventory. The root .gitignore keeps a hosts.yml filled in inside this public checkout out of git. The shared group_vars/host_vars comments no longer name INVENTORY= or repo-relative docs/scripts paths, and the docs say where the role and playbook paths live in a fleet repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The templates, safeguards, tests, and documentation consistently implement the self-contained fleet workflow.
0 open findings
What changed in this PR
Ships self-contained inventory templates with the Galaxy collection fleet example.
Changes:
- Adds node and publisher inventory templates.
- Enforces synchronization, parsing, and ignore rules with tests.
- Updates documentation and quickstarts for the simplified workflow.
| File | Description |
|---|---|
.gitignore |
Ignores filled fleet inventory files locally. |
AGENTS.md |
Documents inventory synchronization rules. |
CONTRIBUTING.md |
Describes the new script checks. |
README.md |
Simplifies the Galaxy quickstart. |
ansible/README.md |
Links to the ready-made fleet project. |
ansible/galaxy/node/README.md |
Points node users to the bundled inventory. |
ansible/galaxy/publisher/README.md |
Points publishers to the bundled inventory. |
ansible/inventory/group_vars/decdn_nodes.yml |
Makes comments portable across deployment layouts. |
ansible/inventory/host_vars/decdn-node-1/main.yml |
Clarifies repository-relative references. |
ansible/inventory/host_vars/origin-1/main.yml |
Clarifies repository-relative references. |
ansible/inventory/hosts-node.yml.example |
Makes shared template comments layout-neutral. |
ansible/inventory/hosts-publisher.yml.example |
Makes shared template comments layout-neutral. |
docs/node-operators.md |
References the bundled node inventory. |
examples/collection-fleet/README.md |
Documents the self-contained setup. |
examples/collection-fleet/inventory/group_vars/all.yml |
Adds common inventory defaults. |
examples/collection-fleet/inventory/group_vars/decdn_nodes.yml |
Adds shared node configuration. |
examples/collection-fleet/inventory/group_vars/decdn_origin_nodes.yml |
Adds shared origin configuration. |
examples/collection-fleet/inventory/group_vars/iroh_dns_server_hosts.yml |
Adds DNS server configuration. |
examples/collection-fleet/inventory/group_vars/iroh_relay_hosts.yml |
Adds relay configuration. |
examples/collection-fleet/inventory/group_vars/sponsord_hosts.yml |
Adds sponsord configuration. |
examples/collection-fleet/inventory/group_vars/sponsord_onramp_hosts.yml |
Adds onramp configuration. |
examples/collection-fleet/inventory/host_vars/decdn-node-1/main.yml |
Adds example node settings. |
examples/collection-fleet/inventory/host_vars/decdn-node-1/secret.yml.example |
Adds node secret template. |
examples/collection-fleet/inventory/host_vars/origin-1/main.yml |
Adds example origin settings. |
examples/collection-fleet/inventory/host_vars/origin-1/secret.yml.example |
Adds origin secret template. |
examples/collection-fleet/inventory/hosts-node.yml.example |
Adds collection-oriented node inventory. |
examples/collection-fleet/inventory/hosts-publisher.yml.example |
Adds collection-oriented publisher inventory. |
tests/scripts-test.sh |
Tests synchronization, parsing, and ignore behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
The Galaxy quickstart copied
examples/collection-fleet/and then reached back into../devops/ansible/inventory/for the hosts example,group_vars/andhost_vars/, whose comments were written for this repo (make targets, a git-ignoredhosts.yml). The fleet example now ships its owninventory/, so the quickstart is onecp -Rplus copyinghosts-node.yml.exampleandsecret.yml.example.examples/collection-fleet/inventory/: every file the same asansible/inventory/'s, except the twohosts-*.yml.exampleheaders (the comment block up to the first blank line), which nameansible-playbook decdn.*and a committedhosts.yml.Shared text: the hosts examples' bodies and the
group_vars//host_vars/comments no longer name make targets,INVENTORY=or repo-relativedocs//scripts/paths, so one text reads right in both places.make test-scriptschecks:ansible-inventory);secret.*ignored,secret.*.exampleshipped, a filled-inhosts.ymlignored here.Eleven negative cases run on a fixture.
Root
.gitignore: ignoresexamples/collection-fleet/inventory/hosts.y*ml, so ahosts.ymlfilled in inside this public checkout never reaches git. The fleet's own.gitignoreleaves it alone, since a private copy commits it.Docs: root README quickstart, fleet README,
docs/node-operators.md, both collection READMEs,ansible/README.md,AGENTS.md,CONTRIBUTING.md.Test plan
make test-scriptspasses, with the new block and its negative cases allokansible-inventory --graphand--hostresolvedecdn-node-1(andorigin-1underdecdn_origin_nodes), withhosts.ymltracked andsecret.ymlignored🤖 Generated with Claude Code