Created
April 21, 2012 22:25
-
-
Save frimik/2439983 to your computer and use it in GitHub Desktop.
dhcp::subnet support snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class my_dhcp::example { | |
| $subnets = { | |
| 'the main subnet' => { | |
| network => '10.0.0.0', | |
| netmask => '255.255.255.0', | |
| gateway => '10.0.0.1', | |
| domain => 'example.com', | |
| parameters => [ ], | |
| pools => { | |
| 'Unknown clients get this pool.' => { | |
| nameservers => [ | |
| 'bogus.example.com', | |
| ], | |
| parameters => [ | |
| 'max-lease-time 300', | |
| 'allow unknown-clients', | |
| ], | |
| ranges => [ | |
| '10.0.0.200 10.0.0.253', | |
| ], | |
| }, | |
| 'Known clients get this pool.' => { | |
| nameservers => [ | |
| 'ns1.example.com', | |
| 'ns2.example.com', | |
| ], | |
| parameters => [ | |
| 'max-lease-time 28800', | |
| 'deny unknown-clients', | |
| ], | |
| ranges => [ | |
| '10.0.0.5 10.0.0.199', | |
| ], | |
| }, | |
| }, | |
| }, | |
| } | |
| # create all the subnets: | |
| create_resources('dhcp::subnet', $subnets) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment