Code Monkey home page Code Monkey logo

puppet-dnsmasq's Introduction

DESCRIPTION

I wrote this module in need of managing bunch of servers running dnsmasq.

It features some advanced features like:

  • Basic dnsmasq management (service, installation)
  • Cross-OS support (Debian, Ubuntu, RHEL, FreeBSD)
  • Loads of options in basic config (ie TFTP) (If you need any additional option that does not supported in this module, just ping me)
  • Support for DHCP configuration.
  • Support for adding static DHCP records (MAC -> IP binding)
  • Support for adding static DNS records (IP -> hostname binding)
  • Support for DHCP options

DEPENDENCIES

  • puppet >= 2.6
  • puppetlabs/stdlib >= 2.0.0

TODO

  • Rewrite OS detection based on $::OSFamily

Basic class

Will install dnsmasq to act as DNS and TFTP (if specified) server

All possible options shown here

class { 'dnsmasq':
  interface     => 'lo',
  domain        => 'int.lan',
  port          => '53',
  expand_hosts  => true,
  enable_tftp   => true,
  tftp_root     => '/var/lib/tftpboot',
  dhcp_boot     => 'pxelinux.0',
  domain_needed => true,
  bogus_priv    => true,
  no_negcache   => true,
}

DHCP server configuration

Will add DHCP support to dnsmasq.

dnsmasq::dhcp { 'dhcp': 
  dhcp_start => '192.168.1.100',
  dhcp_end   => '192.168.1.200',
  lease_time => '24h'
}

Static DHCP record configuration

Will add static DHCP record to DHCP server with hostname. Please be aware that example-host will also be used as DNS name.

dnsmasq::dhcpstatic { 'example-host':
  mac  => 'DE:AD:BE:EF:CA:FE',
  ip => '192.168.1.10',
}

Static DNS record configuration

Will add static A record, this record will always override upstream data

dnsmasq::address { "example-host-dns.int.lan":
  ip  => '192.168.1.20',
}

DHCP option configuration

Will add dhcp option. Can be used for all types of options, ie:

  • numeric ( dnsmasq::dhcpoption { '53': ... }
  • ipv4-option ( dnsmasq::dhcpoption { 'option:router': ... }
  • ipv6-option ( dnsmasq::dhcpoption { 'option6:dns-server': ... }
dnsmasq::dhcpoption { 'option:router':
  content => '192.168.1.1',
}

puppet-dnsmasq's People

Contributors

rlex avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.