--- a/README Thu Feb 26 18:19:09 2015 +0200
+++ b/README Thu Feb 26 18:22:58 2015 +0200
@@ -5,41 +5,41 @@
Also includes network SNMP discovery.
== Hosts ==
-The `pvl.hosts-* etc/hosts/test` tools read hosts files as input, which have an ini format, using section names as hostnames to configure attributes for that host:
+The `pvl.hosts-*` tools read hosts files as input, which have an ini format, using section names as hostnames to configure attributes for that host:
[foo]
- ip = 127.0.0.1
+ ip = 192.0.2.1
ethernet = 00:11:22:33:44:55
[bar]
- ip = 127.0.0.2
+ ip = 192.0.2.2
ethernet = 01:23:45:67:89:ab
-The default mechanism uses the basename of the given config file as the domain name, so this example file would generate something like the following output for use in a `zone "test" { ... }` zonefile:
+The domain name for a host is determined from the basename of the config file, so this example file would generate something like the following output for use in a `zone "test" { ... }` zonefile:
+
+ $ bin/pvl.hosts-forward --forward-zone example.com etc/hosts/example.com
+ foo A 192.0.2.1
+ bar A 192.0.2.2
- $ pvl.hosts-dns --forward-zone=test etc/hosts/test
- foo A 127.0.0.1
- bar A 127.0.0.2
+And correspondingly, the reverse zone for 192.0.2.0/24
-And correspondingly, the reverse zone for 127.0.0.0/8:
-
- $ pvl.hosts-dns --reverse-zone=127 etc/hosts/test
- 1.0.0 PTR foo.test.
- 2.0.0 PTR bar.test.
+ $ bin/pvl.hosts-reverse --reverse-zone=192.0.2 etc/hosts/example.com
+ 1 PTR foo.example.com.
+ 2 PTR bar.example.com.
And the associated DHCP hosts:
- $ bin/pvl.hosts-dhcp etc/hosts/test
+ $ bin/pvl.hosts-dhcp etc/hosts/example.com
host foo {
option host-name foo;
hardware ethernet 00:11:22:33:44:55;
- fixed-address 127.0.0.1;
+ fixed-address 192.0.2.1;
}
host bar {
option host-name bar;
hardware ethernet 01:23:45:67:89:ab;
- fixed-address 127.0.0.2;
+ fixed-address 192.0.2.2;
}
=== Includes ===
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/example.com Thu Feb 26 18:22:58 2015 +0200
@@ -0,0 +1,7 @@
+[foo]
+ ip = 192.0.2.1
+ ethernet = 00:11:22:33:44:55
+
+[bar]
+ ip = 192.0.2.2
+ ethernet = 01:23:45:67:89:ab
--- a/etc/hosts/test Thu Feb 26 18:19:09 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-[foo]
- ip = 127.0.0.1
- ethernet = 00:11:22:33:44:55
-
-[bar]
- ip = 127.0.0.2
- ethernet = 01:23:45:67:89:ab