ReleaseEngineering/PuppetAgain/Modules/dnsmasq

From MozillaWiki
Jump to: navigation, search

This module installs Dnsmasq which may be configured to be a dhcp server, dns server or tftp server. It is very versatile and lightweight and is typically used by including the dnsmasq::config resource and providing a conf file to configure dnsmasq.

Usage

   dnsmasq::config {
       "ironic_tftp.conf":
           content => template("openstack/ironic_tftp_conf.erb");
   }

Example config

enable-tftp
tftp-root=/tftpboot
interface=eth1
port=0

In this example, tftp is enabled, the root tftp is set, binds to eth1 and port=0 disables dns service. Essentially makes dnsmasq run a tftp server and nothing else. If the module is included without defining the config resource, dnsmasq will run with default settings.

Make sure your module is setting up any directories and files needed for dnsmasq to run. For example, if you are going to use dnsmasq as a tftp server make sure you setup a file resource the tftp root directory.