dnsmasq_install¶
Installs and configures Dnsmasq on the target system using apk, dnf and zypper.
- Installs the Dnsmasq package(s)
- Installs SQLite3 when using the lease database
- Ensures that the user, default
dnsmasq
, usergroup, defaultdnsmasq
, and configuration directory, default/etc/dnsmasq.d
all exist. - Configures Dnsmasq to read the
.conf
files from the configuration directory. - Configures SELinux (when present) to permit Dnsmasq to use
dhcp-hostsdir
. - Configures firewalld (when present) to permit DHCP, DNS or both.
Variables¶
Optional¶
dnsmasq_etc
: The Dnsmasq configuration directory; default is/etc/dnsmasq.d
dnsmasq_user
: The user that Dnsmasq runs as; default isdnsmasq
dnsmasq_usergroup
: The usergroup that the Dnsmasq user belongs to; default isdnsmasq
Playbook¶
- hosts: dnsmasq
roles:
- amigus.dnsmasq.dnsmasq_install