Skip to content

tamucookbooks/bind

Repository files navigation

Bind Cookbook

This cookbook is to install and configure the bind9 service. It is currently a work in progress and is subject to major changes. The idea behind this cookbook is to use with the TAMUArch dhcp cookbook and data bags so you only have to edit records once for both dhcp and dns.

Warning This cookbook is currently under heavy development.

Requirements

Most testing of this cookbook is done with Ubuntu 12.04 but this cookbook should work with later and earlier versions of Ubuntu.

packages

  • bind9 - bind9 is the currently used bind version.

Attributes

bind::default

Key Type Description Default
['bind']['data_bag'] String Name of data bag to use with databag recipe zones
['bind']['soa'] String Start of Authority Record node[:fqdn]
['bind']['soa_email'] String Start of Authority Record Email root.#{node[:fqdn]}
['bind']['ttl'] String default zone duration of record cache 604800
['bind']['refresh'] String default zone refresh interval 604800
['bind']['retry'] String default zone retry interval 86400
['bind']['expire'] String default zone expire intervals 2419200

Resources/Providers

bind_zone

Actions

  • :create: creates the zone
  • :delete: deletes the zone
  • :reverse: creates a reverse zone

Attribute Parameters

  • zone_name: name attribute. the name of the zone
  • network: used for reverse zones only
  • nameservers: array of nameservers to use in the zone
  • records: a hash of records for the zone
  • refresh_time: zone refresh interval
  • retry_time: zone retry iterval
  • expire_time: zone expire interval
  • cache_minimum: zone cache interval
  • serial: custom serial to be used for the zone (this is autogenerated if not set)

Note about records:

  • default resource record is A.
  • default class is IN
  • there is no check for MX rr if priority is set

Usage

bind::default

The default bind recipe will install bind9 and start the service.

Just include bind in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[bind]"
  ]
}

bind::databag

This recipe will read the data bag name from node[:bind][:data_bag] and build out zones using that.

Example Zone Data Bag:

{
  "id": "test",
  "seed": "2013031300",
  "network": "192.168.1.0",
  "nameservers": ["192.168.1.2",
                  "192.168.1.3"],
  "hosts": {
    "test1": {
      "ip": "192.168.1.10",
      "rr": "MX",
      "priority": "20"
    },
    "test2": {
      "ip": "192.168.1.12",
      "cnames": [ "test3",
                  "test4" ]
    }
  }
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: Jim Rosser

About

Bind9 Cookbook

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •