]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
distro/tests: add dnstap test
authorJakub Ružička <jakub.ruzicka@nic.cz>
Wed, 6 Jan 2021 16:58:40 +0000 (17:58 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Fri, 15 Jan 2021 13:49:16 +0000 (14:49 +0100)
distro/tests/ansible-roles/knot_resolver/tasks/configure_dnstap.yaml [new file with mode: 0644]
distro/tests/ansible-roles/knot_resolver/tasks/main.yaml

diff --git a/distro/tests/ansible-roles/knot_resolver/tasks/configure_dnstap.yaml b/distro/tests/ansible-roles/knot_resolver/tasks/configure_dnstap.yaml
new file mode 100644 (file)
index 0000000..817b117
--- /dev/null
@@ -0,0 +1,10 @@
+---
+# SPDX-License-Identifier: GPL-3.0-or-later
+- name: dnstap_config set up kresd.conf
+  blockinfile:
+    marker: -- {mark} ANSIBLE MANAGED BLOCK
+    block: |
+      modules.load('dnstap')
+      assert(dnstap)
+    path: /etc/knot-resolver/kresd.conf
+    insertbefore: BOF
index d99ff3c53bbf69193aa34dcfb7fc77620c15ccdf..921df1b1b06db6413efb1ba647d50a5d860eb6f1 100644 (file)
         - include: test_doh.yaml
       when: distro in ["Fedora", "Debian", "CentOS"] or (distro == "Ubuntu" and ansible_distribution_major_version|int >= 18)
 
+    - name: Test dnstap module
+      block:
+        - name: Install knot-resolver-module-dnstap
+          package:
+            name: knot-resolver-module-dnstap
+            state: latest
+        - include: configure_dnstap.yaml
+        - include: restart_kresd.yaml
+      when: distro in ["Fedora", "Debian", "CentOS", "Ubuntu"]
+
   always:
 
     - name: Get installed package version