mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
Add two local test helpers to run full-stack deployments for all discovered apps: - make test-local-inventory-init-all: bring up dev stack and create inventory (/etc/inventories/local-full-<type>/servers.yml) including all apps - make test-local-run-all: run deploy using the pre-initialized inventory Also mark various scripts as executable (chmod +x) to ensure consistent behavior across environments. https://chatgpt.com/share/6970018e-1244-800f-9345-ca1596061729
29 lines
808 B
Bash
Executable File
29 lines
808 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
DOMAIN="infinito.example"
|
|
|
|
NM_CONF="/etc/NetworkManager/conf.d/00-infinito-dnsmasq.conf"
|
|
NM_DNSMASQ_CONF="/etc/NetworkManager/dnsmasq.d/${DOMAIN}.conf"
|
|
|
|
SYS_DNSMASQ_CONF="/etc/dnsmasq.d/${DOMAIN}.conf"
|
|
|
|
echo ">>> Removing local DNS for *.${DOMAIN}"
|
|
|
|
# Remove NetworkManager dnsmasq setup
|
|
if systemctl is-active --quiet NetworkManager 2>/dev/null; then
|
|
echo ">>> NetworkManager active -> removing NM dnsmasq config"
|
|
sudo rm -f "${NM_CONF}" "${NM_DNSMASQ_CONF}"
|
|
sudo systemctl restart NetworkManager
|
|
fi
|
|
|
|
# Remove system dnsmasq snippet (fallback setup)
|
|
sudo rm -f "${SYS_DNSMASQ_CONF}" || true
|
|
|
|
# If system dnsmasq is active, restart to apply
|
|
if systemctl is-active --quiet dnsmasq 2>/dev/null; then
|
|
sudo systemctl restart dnsmasq || true
|
|
fi
|
|
|
|
echo ">>> Removed."
|