Manages bind configuration under Debian / Ubuntu and CentOS.
This module is provided by Camptocamp
- bind
This class must be declared before using the definitions in this module.
- bind::a
- bind::acl
- bind::generate
- bind::mx
- bind::record
- bind::zone
Creates an A record (or a series thereof).
bind::a { 'Hosts in example.com':
ensure => 'present',
zone => 'example.com',
ptr => false,
hash_data => {
'host1' => { owner => '192.168.0.1', },
'host2' => { owner => '192.168.0.2', },
},
}
Ensure the A record is present.
Zone name.
Zone data.
Pointer records (PTR) are used to map a network interface to a host name. Primarily used for reverse DNS.
Needed if $ptr
is true. For reverse DNS you will have to setup your reverse DNS domain. This is a special domain that ends with in-addr.arpa
.
Zone content;
Zone content template.
Creates an ACL bloc
bind::acl {'my acl':
ensure => present,
acls => [
'!192.168.1.0/24',
'any'
],
}
Ensure the ACL is present (or absent if set to "absent")
List of ACL directive
Creates a $GENERATE directive for a specific zone
bind::generate {'a-records':
zone => 'test.tld',
range => '2-100',
record_type => 'A',
lhs => 'dhcp-$', # creates dhcp-2.test.tld, dhcp-3.test.tld …
rhs => '10.10.0.$', # creates IP 10.10.0.2, 10.10.0.3 …
}
Ensure the generate is present.
Zone name. Must reflect a bind::zone resource.
Range allocated to internal generate directive. Must be in the form 'first-last'.
Record type. Must be one of PTR, CNAME, DNAME, A, AAAA and NS.
Generated name.
Record target.
Record class. Not compatible with pre-9.3 bind versions.
Time to live for generated records.
Creates an MX record.
bind::mx {'mx1':
zone => 'domain.ltd',
owner => '@',
priority => 1,
host => 'mail.domain.ltd',
}
Ensure the MX record is present.
Zone name.
Target of the resource record.
MX record priority.
Owner of the resource record.
Time to live for the resource record.
Creates a generic record (or a series thereof).
bind::record {'CNAME foo.example.com':
zone => 'foo.example.com',
record_type => 'CNAME',
hash_data => {
'ldap' => { owner => 'ldap.internal', },
'voip' => { owner => 'voip.internal', },
}
}
Ensure the record is present.
Zone name.
Hash containing data.
Resource record type.
Record content.
Allows you to do your own template, letting you use your own hash_data content structure.
PTR zone.
Creates a zone.
bind::zone {'test.tld':
zone_contact => 'contact.test.tld',
zone_ns => ['ns0.test.tld'],
zone_serial => '2012112901',
zone_ttl => '604800',
zone_origin => 'test.tld',
}
Ensure the zone is present.
Boolean to set if a zone is dynamic.
List of hosts that are allowed to submit dynamic updates for master zones.
Source IP to bind to when requesting a transfer (slave only).
Specify if the zone is master/slave/forward.
Time to live for your zonefile (master only).
Valid contact record (master only).
Zone serial (master only).
Time between each slave refresh (master only).
Time between each slave retry (master only).
Slave expiracy time (master only).
Valid NS for this zone (master only).
Valid xfers for zone (master only).
Valid master for this zone (slave only).
Valid forwarders for this zone (forward only).
The origin of the zone.
IPs to use for also-notify entry.
Boolean to set if a zone is slave.
Creates a key for dynamic zones. The 'secret' value is the key generated by dnssec-keygen.
bind::key { 'key_dyn.test.tld':
ensure => present,
secret => 'xUjDQqpBHao/o7mR2dza2/Tv2DQVo9pEuMfMwhdfzeaEFZAvwA='
}
bind::zone {'dyn.test.tld':
zone_contact => 'contact.test.tld',
zone_ns => ['ns0.test.tld'],
zone_serial => '2012112901',
zone_ttl => '604800',
zone_origin => 'dyn.test.tld',
is_dynamic => true,
allow_update => ['key_dyn.test.tld']
}
Ensure the key is present.
Key content.
Key algorithm.
bind::zone {'example.com':
ensure => 'present',
zone_contact => 'contact.example.com',
zone_ns => ['ns0.example.com'],
zone_serial => '2012112901',
zone_ttl => '604800',
zone_origin => 'example.com',
}
bind::a { 'example.com':
ensure => 'present',
zone => 'example.com',
ptr => false,
hash_data => {
'host1' => { owner => '192.168.0.1', },
'host2' => { owner => '192.168.0.2', },
},
}
Please report bugs and feature request using GitHub issue tracker.
For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint to follow the recommended Puppet style guidelines from the Puppet Labs style guide.
Copyright (c) 2013 mailto:[email protected] All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.