Skip to content

docs: add Ansible IaC guide for tenant configuration#759

Merged
SunsetDrifter merged 1 commit into
mainfrom
docs/ansible-iac
Jul 10, 2026
Merged

docs: add Ansible IaC guide for tenant configuration#759
SunsetDrifter merged 1 commit into
mainfrom
docs/ansible-iac

Conversation

@SunsetDrifter

@SunsetDrifter SunsetDrifter commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New page Configure NetBird with Ansible at /selfhosted/iac/ansible, documenting the community.ansible_netbird collection for managing tenant resources (users, groups, setup keys, policies, networks, DNS, posture checks, IdPs) declaratively against the REST API.
  • New sidebar group Infrastructure as Code under Self-Host NetBird, sized to accept additional IaC tools later (e.g. Terraform).
  • Cross-link from selfhosted/automated-setup.mdx so operators who just minted their first PAT see the declarative next step.

Scope notes

  • Covers tenant configuration only. Fleet-installing the NetBird client on machines via Ansible is intentionally out of scope; that use case is already mentioned in manage/peers/register-machines-using-setup-keys.mdx.
  • The collection works against any NetBird tenant (cloud or self-hosted); the page calls that out explicitly so the placement under Self-Host doesn't mislead cloud operators.
  • Links out to upstream examples/ instead of mirroring playbooks that would rot.

Summary by CodeRabbit

  • New Features

    • Added a new documentation page for managing NetBird with Ansible, including setup, authentication, examples, supported resource types, and troubleshooting.
    • Added a new “Infrastructure as Code” entry under the self-hosted documentation navigation, linking to the Ansible guide.
  • Documentation

    • Updated the automated setup guide to reference declarative bootstrap tasks and point to the Ansible instructions.

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new documentation page for managing NetBird resources declaratively via the community.ansible_netbird Ansible collection, including prerequisites, authentication, an example playbook, module reference, and troubleshooting. Wires the page into site navigation and cross-links it from the automated-setup guide.

Changes

Ansible Documentation

Layer / File(s) Summary
Navigation and cross-link wiring
src/components/NavigationDocs.jsx, src/pages/selfhosted/automated-setup.mdx
Adds an "Infrastructure as Code" nav group linking to the Ansible page and a sentence linking the automated-setup guide to it.
Overview, prerequisites, and setup
src/pages/selfhosted/iac/ansible.mdx
Adds page description, overview of REST API management, prerequisites, and build/install instructions for the collection.
Authentication and example playbook
src/pages/selfhosted/iac/ansible.mdx
Documents environment variable/module_defaults authentication and a full example playbook creating a group and setup key with secret persistence.
Module reference and troubleshooting
src/pages/selfhosted/iac/ansible.mdx
Lists supported resource modules and adds troubleshooting guidance for auth errors, TLS, timeouts, and setup key behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: braginini

Poem

A hop, a skip, a doc so bright,
Ansible pages coming into light,
Groups and keys and setup right,
Nav links guide the reader's flight,
This bunny thumps with pure delight! 🐇📜

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding an Ansible IaC guide for tenant configuration docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/ansible-iac

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/NavigationDocs.jsx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/selfhosted/automated-setup.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/selfhosted/iac/ansible.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SunsetDrifter SunsetDrifter force-pushed the docs/ansible-iac branch 8 times, most recently from 8d94e74 to be642f9 Compare July 8, 2026 15:28
Document the community.ansible_netbird collection for managing NetBird
resources (users, groups, setup keys, policies, networks, DNS, posture
checks) declaratively via the REST API. Adds a new Infrastructure as
Code subsection under Self-Host NetBird with room for future entries.

Cross-links from the Automated Setup PAT bootstrap page since the
collection is the natural next step after obtaining the first token.
@SunsetDrifter SunsetDrifter marked this pull request as ready for review July 9, 2026 06:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/selfhosted/iac/ansible.mdx`:
- Around line 1-160: The docs page currently links the NetBird REST API to a
stale internal path, so update the reference in the description/introduction
content to the existing public API docs target instead. Fix the markdown link
that points to the API introduction from the `description` export or nearby
prose in `ansible.mdx`, and use the public API page path already used elsewhere
in the site (or add a redirect if that’s the chosen docs pattern).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87a1a4f8-6806-4cab-a0b0-782d50c7e7b0

📥 Commits

Reviewing files that changed from the base of the PR and between 25898dc and 7c86bd0.

📒 Files selected for processing (3)
  • src/components/NavigationDocs.jsx
  • src/pages/selfhosted/automated-setup.mdx
  • src/pages/selfhosted/iac/ansible.mdx

Comment thread src/pages/selfhosted/iac/ansible.mdx
@SunsetDrifter SunsetDrifter merged commit 67152df into main Jul 10, 2026
3 checks passed
@SunsetDrifter SunsetDrifter deleted the docs/ansible-iac branch July 10, 2026 10:46
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