From 4aef2d63ef1607d418a580ccc51b8baeb50f6fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ricart?= Date: Fri, 28 Feb 2025 11:03:49 +0100 Subject: [PATCH] [DEBIAN] fix DNS template --- parsers/debian.py | 2 +- template/debian.rst.j2 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/parsers/debian.py b/parsers/debian.py index c660720..d63152b 100644 --- a/parsers/debian.py +++ b/parsers/debian.py @@ -31,7 +31,7 @@ def parse_debian(content): if current_section: result[current_section] += line + "\n" for section in result: - if section in ["services","routes", "docker"]: + if section in ["resolvconf","services","routes", "docker"]: result[section] = loads(result[section]) result["ip"] = parse_ip(result["ip"]) result["os"] = loads(result["version"]) diff --git a/template/debian.rst.j2 b/template/debian.rst.j2 index dfffd2e..b7e7230 100644 --- a/template/debian.rst.j2 +++ b/template/debian.rst.j2 @@ -21,6 +21,11 @@ destination netmask gateway interface {{ "{:<12}".format(route["destination"]) }} {{ "{:<15}".format(route["genmask"]) }} {{ "{:<15}".format(route["gateway"]) }} {{ route["iface"] }}{% endfor %} ============ =============== =============== ============== +{% if resolvconf %}DNS +### + +{{ "{}".format(resolvconf["nameserver"]) }}{% endif %} + services --------