Add netbox_deploy Ansible role for deploying NetBox via Argo CD #33
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.
Original prompt
This section details on the original issue you should resolve
<issue_title>Deploy Netbox helm chart</issue_title>
<issue_description>https://github.com/netbox-community/netbox-chart
Deploy NetBox Argo Application with proper configuration
Goal
Create a new Ansible role that deploys NetBox to the homelab k3s cluster via an Argo CD
Applicationresource, following the same patterns and quality bar as the existing deployment roles:ansible/roles/homepage_deployansible/roles/longhorn_deployansible/roles/tailscale_operator_deployansible/roles/synology_csi_deployThis role should render a complete, production-ready Argo CD
Applicationspec using the upstream, vendor official NetBox Helm chart, wired cleanly into the existing HA k3s + Tailscale + Longhorn + Synology stack.Scope
This issue is only for:
ansible/roles/netbox_deployApplicationYAML and Helm values into the standard artifacts treeIt does not cover seeding NetBox data, custom device models, or migration tooling beyond what the chart already provides.
Role structure and conventions
Follow the same structure and conventions as the existing
*_deployroles:ansible/roles/netbox_deploy/meta/argument_specs.ymlansible/roles/netbox_deploy/defaults/main.ymlansible/roles/netbox_deploy/tasks/main.ymlRules:
netbox_deploy_.role_artifactsrole exactly the same way other deploy roles do to determine where rendered files are written.Argo CD Application spec requirements
Use Argo CD’s official Application spec as the reference.
The role should:
Render a complete Argo
Applicationmanifest for NetBox:apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata.name: netboxmetadata.namespace: Argo CD’s namespace (derived or provided the same way as the other deploy roles).spec.project: the same Argo project used for other homelab apps.spec.source:netbox_deploy_helm_chart_version.spec.source.helm.valuesObject(see Helm section below).spec.destination:server: in-cluster API server, consistent with the other deploy roles.namespace:netboxby default, driven bynetbox_deploy_namespace.spec.syncPolicy:syncOptions,retry) as the existing homelab application roles.Write the Application YAML to the artifacts directory using
role_artifacts:Follow the same structure as the other application deploy roles. For example:
.artifacts/{{ deploy_env }}/argo/applications/netbox-application.yamlAll output paths are derived from
role_artifactsoutputs, not hard coded.Optionally apply the Application to the cluster:
netbox_deploy_apply_application(bool) to control whether the rendered manifest is applied.true, apply usingkubernetes.core.k8sor a testedkubectlflow that matches existing patterns, including any CLI prerequisites those roles enforce.Helm configuration and values
Use the official NetBox Helm chart from the upstream vendor. Configure the Application
spec.source.helmlike this:netbox_deploy_helm_repo_url: default to the official NetBox chart repo.netbox_deploy_helm_chart_name: default to the correct NetBox chart name.netbox_deploy_helm_chart_version: default to the latest stable, but overridable.Overrides rule:
spec.source.helm.valuesObject.valuesObject.netbox_deploy_values_overridesshould be a dict that is merged directly intovaluesObjectand used as the single source of override truth.Values must:
Respect the HA k3s layout:
netbox_deploy_values_overrideswhen needed, but do not re-state defaults.Integrate with Longhorn and Synology:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.