Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Bulk-delete PTR records from FreeIPA DNS, driven by a CSV file.
CSV format (no header):
fqdn,ip
Example:
host1.example.com,192.168.1.50
host2.example.com,10.0.0.75
param(
[Parameter(Mandatory=$true)]
[string]$File
)
if (-not (Test-Path $File)) {
Write-Host "File not found: $File"
exit 1
}
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: $0 <file>"
exit 1
fi
FILE="$1"
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: $0 <file> [rndc_key]"
echo " rndc_key defaults to /etc/rndc.key"
exit 1
fi
FILE="$1"
#!/usr/bin/env python3
"""
Bulk-update A records in FreeIPA DNS, driven by a CSV file.
CSV format (no header):
fqdn,new_ip
Example:
host1.example.com,10.200.1.50
host2.example.com,10.200.0.75