remove_device
Remove a device from the homelab inventory sitemap using its device ID. Use dry-run to preview deletion without writing; credentials are retained.
Instructions
Delete a single sitemap row by device_id. Pure SQL DELETE on the sitemap row plus cascade DELETE on discovery_history rows for that device_id. No SSH dial, no Ansible runs, no Terraform plans on the handler call path. The keyring credential entry bound via ssh_credential_id is preserved — only the sitemap row is dropped, so a subsequent discover_and_map can re-bind without re-adding the credential. Pass dry_run=true to preview the would-delete row payload without writing. Use remove_device for inventory-only deletion of one row; use purge_devices for bulk filter-based inventory deletion; use decommission_device when host-side cleanup (stop services, remove from clusters) is required before deletion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | Database ID of the device to remove (look up via get_network_sitemap). | |
| dry_run | No | If true, return the would-delete row payload without writing (default: false). |