Verify knot installation cookbook on Rocky Linux using Sparky
https://docs.rockylinux.org/guides/dns/knot_authoritative_dns/
[task stdout]
15:16:50 :: Last metadata expiration check: 0:17:16 ago on Mon 29 Sep 2025 02:59:34 PM UTC.
15:16:50 :: Package epel-release-9-10.el9.noarch is already installed.
15:16:50 :: Dependencies resolved.
15:16:50 :: Nothing to do.
15:16:50 :: Complete!
15:16:51 :: Last metadata expiration check: 0:17:17 ago on Mon 29 Sep 2025 02:59:34 PM UTC.
15:16:51 :: Package knot-3.3.10-1.el9.x86_64 is already installed.
15:16:51 :: Dependencies resolved.
15:16:51 :: Nothing to do.
15:16:51 :: Complete!
15:16:52 :: Last metadata expiration check: 0:17:18 ago on Mon 29 Sep 2025 02:59:34 PM UTC.
15:16:52 :: Package bind-utils-32:9.16.23-31.el9_6.x86_64 is already installed.
15:16:52 :: Dependencies resolved.
15:16:52 :: Nothing to do.
15:16:52 :: Complete!
15:16:53 :: server:
15:16:53 :: listen: 0.0.0.0@53
15:16:53 :: listen: ::@53
15:16:53 ::
15:16:53 :: zone:
15:16:53 :: - domain: example.com
15:16:53 :: storage: /var/lib/knot/zones
15:16:53 :: file: example.com.zone
15:16:53 ::
15:16:53 :: log:
15:16:53 :: - target: syslog
15:16:53 :: any: info
15:16:53 ::
15:16:53 :: $TTL 86400 ; How long should records last?
15:16:53 :: ; $TTL used for all RRs without explicit TTL value
15:16:53 :: $ORIGIN example.com. ; Define our domain name
15:16:53 :: @ 1D IN SOA ns1.example.com. hostmaster.example.com. (
15:16:53 :: 2024061301 ; serial
15:16:53 :: 3h ; refresh duration
15:16:53 :: 15 ; retry duration
15:16:53 :: 1w ; expiry duration
15:16:53 :: 3h ; nxdomain error ttl
15:16:53 :: )
15:16:53 :: IN NS ns1.example.com. ; in the domain
15:16:53 :: IN MX 10 mail.another.com. ; external mail provider
15:16:53 :: IN A 172.20.0.100 ; default A record
15:16:53 :: ; server host definitions
15:16:53 :: ns1 IN A 172.20.0.100 ; name server definition
15:16:53 :: www IN A 172.20.0.101 ; web server definition
15:16:53 :: mail IN A 172.20.0.102 ; mail server definition
[task stderr]
15:17:08 :: Removed "/etc/systemd/system/multi-user.target.wants/knot.service".
15:17:08 :: Created symlink /etc/systemd/system/multi-user.target.wants/knot.service → /usr/lib/systemd/system/knot.service.
[task run: task.bash - tasks/knot-test]
[dump code: task.bash]
[1] # Check knot is enabled and running
[2] sudo systemctl is-enabled knot
[3] sudo systemctl is-active knot
[4]
[5] # Check DNS resolution using host command
[6] host example.com 127.0.0.1
[7]
[8] # Check individual records using dig command
[9] dig a @127.0.0.1 +short example.com
[10] dig a @127.0.0.1 +short ns1.example.com
[11] dig a @127.0.0.1 +short www.example.com
[12] dig a @127.0.0.1 +short mail.example.com
[13] dig mx @127.0.0.1 +short example.com
[14]
[task stdout]
15:17:08 :: enabled
15:17:08 :: active
15:17:08 :: Using domain server:
15:17:08 :: Name: 127.0.0.1
15:17:08 :: Address: 127.0.0.1#53
15:17:08 :: Aliases:
15:17:08 ::
15:17:08 :: example.com has address 172.20.0.100
15:17:08 :: example.com mail is handled by 10 mail.another.com.
15:17:08 :: 172.20.0.100
15:17:08 :: 172.20.0.100
15:17:08 :: 172.20.0.101
15:17:08 :: 172.20.0.102
15:17:08 :: 10 mail.another.com.
[task check]
stdout match (s) <enabled> True
stdout match (s) <active> True
stdout match (s) <Using domain server:> True
stdout match (s) <Name: 127.0.0.1> True
stdout match (s) <Address: 127.0.0.1> True
stdout match (s) <Aliases:> True
stdout match (s) <^^ $$> True
stdout match (s) <example.com has address 172.20.0.100> True
stdout match (s) <example.com mail is handled by 10 mail.another.com.> True
stdout match (s) <172.20.0.100> True
stdout match (s) <172.20.0.100> True
stdout match (s) <172.20.0.101> True
stdout match (s) <172.20.0.102> True
stdout match (s) <10 mail.another.com.> True
---