DnsmasqConf - files /etc/dnsmasq.conf
and /etc/dnsmasq.d/*.conf
¶
- class insights.parsers.dnsmasq_config.DnsmasqConf(context)[source]¶
Bases:
ConfigParser
Class to parses the content of dnsmasq configuration files
/etc/dnsmasq.conf
and/etc/dnsmasq.d/*.conf
Sample configuration output:
# Listen on this specific port instead of the standard DNS port # (53). Setting this to zero completely disables DNS function, # leaving only DHCP and/or TFTP. port=5353 no-resolv domain-needed no-negcache max-cache-ttl=1 enable-dbus dns-forward-max=5000 cache-size=5000 bind-dynamic except-interface=lo server=/in-addr.arpa/127.0.0.1 server=/cluster.local/127.0.0.1 # End of config
- Examples::
>>> "no-resolv" in conf True >>> conf["server"] server=/in-addr.arpa/127.0.0.1 server=/cluster.local/127.0.0.1 >>> conf["dns-forward-max"][-1].value 5000