Author image Daniel P. Berrangé
and 1 contributors

NAME

NoZone - a Bind DNS zone file generator

SYNOPSIS

  use NoZone;
  use YAML qw();

  my $cfg = YAML::LoadFile("/etc/nozone.yml");

  my $nozone = NoZone->new();
  $nozone->load_config($cfg);
  $nozone->generate_zones();

DESCRIPTION

The NoZone module provides a system for generating Bind DNS zone files from data stored in a much simpler configuration file format.

METHODS

my $nozone = NoZone->new( datadir => "/var/named/data", confdir => "/etc/named", masters => []);

Creates a new NoZone object instance. The datadir parameter specifies where the zone data files should be created, while confdir specifies where the zone conf files should be created. Both have sensible defaults if omitted. The optional masters list provides a list of master servers. If present, only a slave zone config will be generated.

$nozone->load_config($cfg);

Load details for the DNS zones from the configuration data in $cfg, which is a hash reference, typically resulting from loading a YAML file. See nozone.yml for a description of the required configuration file format.

$nozone->generate_zones($verbose=0);

Generate all the bind DNS zone data files for loaded zones. If the $verbose flag is set to a true value, the progress will be printed

AUTHORS

nozone was written by Daniel P. Berrange <dan@berrange.com>

LICENSE

nozone is distributed under the terms of the GNU GPL version 3 or any later version. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

SEE ALSO

NoZone::Zone, nozone(1)