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.
Most testing of this cookbook is done with Ubuntu 12.04 but this cookbook should work with later and earlier versions of Ubuntu.
bind9- bind9 is the currently used bind version.
| 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 |
- :create: creates the zone
- :delete: deletes the zone
- :reverse: creates a reverse zone
- 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)
- default resource record is A.
- default class is IN
- there is no check for MX rr if priority is set
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]"
]
}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" ]
}
}
}- Fork the repository on Github
- Create a named feature branch (like
add_component_x) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: Jim Rosser