From eb6f9f0f91e88033e8b386eba95f171d33f0feee Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 25 Apr 2023 21:27:50 +0200 Subject: dnsmasq playbook appears unused --- playbooks.d/dns-dnsmasq/description.txt | 1 - playbooks.d/dns-dnsmasq/etc/defaults | 6 ---- playbooks.d/dns-dnsmasq/etc/os.d/linux-gentoo | 1 - playbooks.d/dns-dnsmasq/playbook.bash | 48 --------------------------- playbooks.d/dns-dnsmasq/share/dnsmasq.conf | 14 -------- 5 files changed, 70 deletions(-) delete mode 100644 playbooks.d/dns-dnsmasq/description.txt delete mode 100644 playbooks.d/dns-dnsmasq/etc/defaults delete mode 100644 playbooks.d/dns-dnsmasq/etc/os.d/linux-gentoo delete mode 100644 playbooks.d/dns-dnsmasq/playbook.bash delete mode 100644 playbooks.d/dns-dnsmasq/share/dnsmasq.conf (limited to 'playbooks.d') diff --git a/playbooks.d/dns-dnsmasq/description.txt b/playbooks.d/dns-dnsmasq/description.txt deleted file mode 100644 index 0c12e3a..0000000 --- a/playbooks.d/dns-dnsmasq/description.txt +++ /dev/null @@ -1 +0,0 @@ -Local DNS resolver with dnsmasq diff --git a/playbooks.d/dns-dnsmasq/etc/defaults b/playbooks.d/dns-dnsmasq/etc/defaults deleted file mode 100644 index 4d3305a..0000000 --- a/playbooks.d/dns-dnsmasq/etc/defaults +++ /dev/null @@ -1,6 +0,0 @@ -pkg.dnsmasq=dnsmasq -svc.dnsmasq=dnsmasq - -dns.port=53 -dns.host=127.0.0.1 -dns.domain=localhost diff --git a/playbooks.d/dns-dnsmasq/etc/os.d/linux-gentoo b/playbooks.d/dns-dnsmasq/etc/os.d/linux-gentoo deleted file mode 100644 index 2aec434..0000000 --- a/playbooks.d/dns-dnsmasq/etc/os.d/linux-gentoo +++ /dev/null @@ -1 +0,0 @@ -pkg.dnsmasq=net-dns/dnsmasq diff --git a/playbooks.d/dns-dnsmasq/playbook.bash b/playbooks.d/dns-dnsmasq/playbook.bash deleted file mode 100644 index f4be8cd..0000000 --- a/playbooks.d/dns-dnsmasq/playbook.bash +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -playbook_add() { - info "$BASHTARD_PLAYBOOK" "Installing packages" - pkg install dnsmasq - - playbook_sync - - info "$BASHTARD_PLAYBOOK" "Enabling services" - svc enable dnsmasq - svc start dnsmasq -} - -playbook_sync() { - mkdir -pv -- "$(config "fs.etcdir")/dnsmasq.d" - - info "$BASHTARD_PLAYBOOK" "Writing config" - file_template "dnsmasq.conf" \ - "host=$(config "dns.host")" \ - "port=$(config "dns.port")" \ - "domain=$(config "dns.domain")" \ - "confd=$(config "fs.etcdir")/dnsmasq.d" \ - > "$(config "fs.etcdir")/dnsmasq.conf" - - while read -r key - do - printf "server=%s\n" "$(config "dns.upstream.$key")" - done < <(config_subkeys "dns.upstream") > "$(config "fs.etcdir")/dnsmasq.d/servers.conf" - - while read -r key - do - printf "address=/$(config "dns.address.$key" | sed s@:@/@)\n" - done < <(config_subkeys "dns.address") > "$(config "fs.etcdir")/dnsmasq.d/addresses.conf" - - [[ "$BASHTARD_COMMAND" == "add" ]] && return - - info "$BASHTARD_PLAYBOOK" "Restarting services" - svc restart dnsmasq -} - -playbook_del() { - info "$BASHTARD_PLAYBOOK" "Disabling services" - svc stop dnsmasq - svc disable dnsmasq - - info "$BASHTARD_PLAYBOOK" "Uninstalling packages" - pkg uninstall dnsmasq -} diff --git a/playbooks.d/dns-dnsmasq/share/dnsmasq.conf b/playbooks.d/dns-dnsmasq/share/dnsmasq.conf deleted file mode 100644 index 4fe090c..0000000 --- a/playbooks.d/dns-dnsmasq/share/dnsmasq.conf +++ /dev/null @@ -1,14 +0,0 @@ -# Binding -listen-address=${host} -port=${port} -bind-interfaces - -# Local domain -domain=${domain} - -# Upstream DNS Servers -no-resolv -conf-file=${confd}/servers.conf - -# Addresses -conf-file=${confd}/addresses.conf -- cgit v1.1