Skip to content

labops dns

Manage local DNS records

Usage:

$ labops dns [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • list: List the local DNS records...
  • diff: Compare the config against...
  • sync: Sync the config's records to...
  • upgrade: Upgrade the DNS server...

labops dns list

List the local DNS records derived from the config (no network).

Works before you have a server to point at: records come from the config tree, not from the server, so this shows what dns sync would publish. Needs only settings.dns.suffix.

Usage:

$ labops dns list [OPTIONS]

Options:

  • --help: Show this message and exit.

labops dns diff

Compare the config against the server (changes nothing).

Shows what dns sync would add, change and delete. Reads the server, so it needs a server block under settings.dns and whatever that server authenticates with (for Pi-hole, PIHOLE_PASSWORD in the .env store).

Usage:

$ labops dns diff [OPTIONS]

Options:

  • --help: Show this message and exit.

labops dns sync

Sync the config's records to the server (deletes what the config no longer has).

The plan is always printed first; deletions ask for confirmation unless --yes is given. --dry-run prints the plan and stops.

Usage:

$ labops dns sync [OPTIONS]

Options:

  • -y, --yes: Apply without confirming, even when records will be deleted.
  • --help: Show this message and exit.

labops dns upgrade

Upgrade the DNS server software itself.

For Pi-hole: runs its own updater on settings.dns.pihole.target over SSH — there is no API for it, and host update / lxc update only run the package manager, which never sees it. Bare installs only — a containerised Pi-hole upgrades via docker stack update. Not every backend can upgrade itself; one that cannot says so. --dry-run skips the command instead of running it.

Usage:

$ labops dns upgrade [OPTIONS]

Options:

  • --help: Show this message and exit.