Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

netbox-powerdns-integration

БесплатноЗапускает вложенные скриптыНе проверен

NetBox IPAM and PowerDNS integration for automated DNS record management.

basher83от basher83★ 24 звезды на GitHub12 установок в других каталогах

Об этом скилле

NetBox PowerDNS Integration

Expert guidance for implementing NetBox as your source of truth for infrastructure documentation and automating DNS record management with PowerDNS.

Quick Start

Common Tasks

Query NetBox API:

# List all sites
./tools/netbox_api_client.py sites list

# Get device details
./tools/netbox_api_client.py devices get --name foxtrot

# List VMs in cluster
./tools/netbox_api_client.py vms list --cluster matrix

# Query IPs
./tools/netbox_api_client.py ips query --dns-name docker-01

Create VM in NetBox:

# Create VM with auto-assigned IP
./tools/netbox_vm_create.py --name docker-02 --cluster matrix --vcpus 4 --memory 8192

# Create VM with specific IP
./tools/netbox_vm_create.py --name k8s-01-master --cluster matrix --ip 192.168.3.50/24

IPAM Queries:

# Get available IPs
./tools/netbox_ipam_query.py available --prefix 192.168.3.0/24

# Check prefix utilization
./tools/netbox_ipam_query.py utilization --site matrix

# View IP assignments
./tools/netbox_ipam_query.py assignments --prefix 192.168.3.0/24

Validate DNS Naming:

./tools/validate_dns_naming.py --name "docker-01-nexus.spaceships.work"

Deploy from NetBox Inventory:

cd ansible && uv run ansible-playbook -i tools/netbox-dynamic-inventory.yml deploy-from-netbox.yml

When to Use This Skill

Activate this skill when:

  • Querying NetBox API - Sites, devices, VMs, IPs, prefixes, VLANs
  • Setting up NetBox IPAM - Prefixes, IP management, VRFs
  • Implementing automated DNS - PowerDNS sync plugin configuration
  • Creating DNS naming conventions - service-NN-purpose.domain pattern
  • Managing VMs in NetBox - Creating, updating, IP assignment
  • Using Terraform with NetBox - Provider configuration and resources
  • Setting up Ansible dynamic inventory - NetBox as inventory source
  • Troubleshooting NetBox-PowerDNS sync - Tag matching, zone configuration
  • Migrating to NetBox - From manual DNS or spreadsheet tracking
  • Infrastructure documentation - Using NetBox as source of truth

Core Workflows

1. NetBox API Usage

Query infrastructure data:

#!/usr/bin/env -S uv run --script --quiet
# /// script
# requires-python = ">=3.11"
# dependencies = ["pynetbox>=7.0.0", "infisical-python>=2.3.3"]
# ///

import pynetbox
from infisical import InfisicalClient

# Get token from Infisical
client = InfisicalClient()
token = client.get_secret(
    secret_name="NETBOX_API_TOKEN",
    project_id="7b832220-24c0-45bc-a5f1-ce9794a31259",
    environment="prod",
    path="/matrix"
).secret_value

# Connect to NetBox
nb = pynetbox.api('https://netbox.spaceships.work', token=token)

# Query devices in Matrix cluster
site = nb.dcim.sites.get(slug='matrix')
devices = nb.dcim.devices.filter(site='matrix')

for device in devices:
    print(f"{device.name}: {device.primary_ip4.address if device.primary_ip4 else 'No IP'}")

See reference/netbox-api-guide.md for complete API reference.

2. DNS Naming Convention

This infrastructure uses the pattern: <service>-<number>-<purpose>.<domain>

Examples:

  • docker-01-nexus.spaceships.work - Docker host #1 running Nexus
  • proxmox-foxtrot-mgmt.spaceships.work - Proxmox node Foxtrot management interface
  • k8s-01-master.spaceships.work - Kubernetes cluster master node #1

Implementation:

# tools/validate_dns_naming.py validates this pattern
pattern = r'^[a-z0-9-]+-\d{2}-[a-z0-9-]+\.[a-z0-9.-]+$'

See workflows/naming-conventions.md for complete rules.

3. NetBox + PowerDNS Sync Setup

Step 1: Install Plugin

# In NetBox virtualenv
pip install netbox-powerdns-sync

Step 2: Configure Plugin

# /opt/netbox/netbox/netbox/configuration.py
PLUGINS = ['netbox_powerdns_sync']

PLUGINS_CONFIG = {
    "netbox_powerdns_sync": {
        "powerdns_managed_record_comment": "netbox-managed",
        "post_save_enabled": True,  # Real-time sync
    },
}

Step 3: Create Zones in NetBox

Configure zones with:

  • Zone name (e.g., spaceships.work)
  • PowerDNS server connection
  • Tag matching rules (e.g., production-dns)
  • DNS name generation method

See reference/sync-plugin-reference.md for details.

4. Terraform Integration

Provider Setup:

terraform {
  required_providers {
    netbox = {
      source  = "e-breuninger/netbox"
      version = "~> 5.0.0"
    }
  }
}

provider "netbox" {
  server_url = "https://netbox.spaceships.work"
  api_token  = var.netbox_api_token
}

Create IP with Auto-DNS:

resource "netbox_ip_address" "docker_host" {
  ip_address  = "192.168.1.100/24"
  dns_name    = "docker-01-nexus.spaceships.work"
  description = "Docker host for Nexus registry"

  tags = [
    "terraform",
    "production-dns"  # Triggers auto DNS sync
  ]
}

DNS records created

Полный SKILL.md на GitHub

Установить netbox-powerdns-integration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

anti-patterns/common-mistakes.mdexamples/01-vm-with-dns/README.mdexamples/01-vm-with-dns/main.tfexamples/01-vm-with-dns/variables.tfreference/netbox-api-guide.mdreference/netbox-best-practices.mdreference/netbox-data-models.mdreference/sync-plugin-reference.mdreference/terraform-provider-guide.mdtools/netbox_api_client.pytools/netbox_ipam_query.pytools/netbox_vm_create.pytools/validate_dns_naming.pyworkflows/ansible-dynamic-inventory.mdworkflows/dns-automation.mdworkflows/naming-conventions.md

FAQ

Что делает скилл netbox-powerdns-integration?

NetBox IPAM and PowerDNS integration for automated DNS record management.

Как установить скилл netbox-powerdns-integration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл netbox-powerdns-integration запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить netbox-powerdns-integration с