From a468044c0337d1a2ac0dab2ce3efc4ad766f81a3 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Tue, 16 Dec 2025 23:02:49 -0500 Subject: Rework the NSD role to support more operating systems with minimal effort and duplication --- vars/main.yml | 14 ++++++++++++++ vars/openbsd.yml | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 vars/main.yml create mode 100644 vars/openbsd.yml (limited to 'vars') diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..8e4dbe5 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,14 @@ +--- +is_alpine: '{{ansible_facts["system"].lower() == "linux" and ansible_facts["distribution"].lower() == "alpine"}}' +is_voidlinux: '{{ansible_facts["system"].lower() == "linux" and ansible_facts["distribution"].lower() == "void"}}' +is_rhel: '{{ansible_facts["system"].lower() == "linux" and ansible_facts["os_family"].lower() == "redhat"}}' +is_deb: '{{ansible_facts["system"].lower() == "linux" and ansible_facts["os_family"].lower() == "debian"}}' +is_openbsd: '{{ansible_facts["system"].lower() == "openbsd"}}' + + +# Overridden in other vars based on OS +use_runit: false +nsd_conf: /etc/nsd/nsd.conf +zone_dir: /etc/nsd/zones +zone_owner: root +zone_group: nsd diff --git a/vars/openbsd.yml b/vars/openbsd.yml new file mode 100644 index 0000000..dd1a03e --- /dev/null +++ b/vars/openbsd.yml @@ -0,0 +1,5 @@ +--- +nsd_conf: /var/nsd/etc/nsd.conf +zone_dir: /var/nsd/zones/master +zone_group: _nsd +use_runit: false -- cgit v1.2.3