Skip to content

Home

This is the documentation for the amigus.dnsmasq Ansible collection. It is available on Ansible Galaxy. It contains roles that automate Dnsmasq. They are modular and create their own separate Dnsmasq configuration files.

Roles

dnsmasq
runs dnsmasq_install then other roles based on which variables are present.
dnsmasq_install
installs Dnsmasq and configures the system to run it.
dnsmasq_dhcp
configures DHCP options and tags, IPv4 ranges, and reservations.
dnsmasq_dhcp_db
adds an SQLite3 DHCP lease management.
dnsmasq_dns
configures DNS resolver options, including upstream servers, and a hosts file.
dnsmasq_web
installs the dnsmasq-web REST API.

Prerequisites

This is an Ansible Collection so it requires Ansible which requires Python. It also requires the Python netaddr libarary.

Quick Start

Install the collection from Ansible Galaxy:

ansible-galaxy collection install amigus.dnsmasq

Target the dnsmasq group in your Ansible inventory:

/etc/ansible/hosts
[dnsmasq]
192.168.100.2

Run the default playbook:

ansible-playbook amigus.dnsmasq.dnsmasq

The initial installation will include no configuration. See the Configuration section of the Getting Started guide for details.