diff options
author | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-14 23:50:03 -0700 |
---|---|---|
committer | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-14 23:50:03 -0700 |
commit | 93895f1f039956ec9d02df511aaeaed885ae34bf (patch) | |
tree | 704909c98dc11bb9206b2c67f3f8557418507a21 /manifests/server.pp | |
parent | 87162a8cc3e47996160f85e1807f75b9ad741bc8 (diff) | |
parent | c0f46562b70777b9a4a39429d94c49e869150c64 (diff) | |
download | puppet-dhcp-93895f1f039956ec9d02df511aaeaed885ae34bf.tar.gz puppet-dhcp-93895f1f039956ec9d02df511aaeaed885ae34bf.tar.bz2 |
Merge pull request #5 from raphink/dev/cleanup
Cleanup, refactor…
Diffstat (limited to 'manifests/server.pp')
-rw-r--r-- | manifests/server.pp | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/manifests/server.pp b/manifests/server.pp index 6bdf51f..a44cfe1 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,39 +1,44 @@ -/* - -= Class: dhcp::server -Simple OS wrapper. Include this to install a dhcp server on your host. - -Requires: - module "common": git://github.com/camptocamp/puppet-common.git - -facultative argument: - *$dhcpd_ddns_update* : ddns-update-style option (default to none) - *$dhcpd_authoritative* : set it if you want that your DHCP server is - authoritative (default to no) - *$dhcpd_opts* : any other DHCPD valid options - -Example: -node "dhcp.toto.ltd" { - $dhcpd_opts = ['domain-name "toto.ltd"', "domain-name-servers 192.168.21.1"] - include dhcp::server - - dhcp::subnet {"10.27.20.0": - ensure => present, - broadcast => "10.27.20.255", - other_opts => ['filename "pxelinux.0";', 'next-server 10.27.10.1;'], - } - - dhcp::host {"titi-eth0": - ensure => present, - mac => "0e:18:fa:fe:d9:00", - subnet => "10.27.20.0", - fixed_address => "10.27.10.52", - } -} -*/ - -class dhcp::server { - case $::operatingsystem { - Debian: { include dhcp::server::debian } - } +# Class: dhcp::server +# +# Installs and configures a DHCP server. +# +# Parameters: +# ['ddns_update'] : ddns-update-style option (defaults to 'none') +# ['authoritative'] : a boolean setting whether the DHCP server is +# authoritative (defaults to false) +# ['opts'] : an array of DHCPD valid options +# +# Sample usage: +# node "dhcp.toto.ltd" { +# class { 'dhcp::server': +# opts => ['domain-name "toto.ltd"', +# 'domain-name-servers 192.168.21.1'], +# } +# +# dhcp::subnet {"10.27.20.0": +# ensure => present, +# broadcast => "10.27.20.255", +# other_opts => ['filename "pxelinux.0";', 'next-server 10.27.10.1;'], +# } +# +# dhcp::host {"titi-eth0": +# ensure => present, +# mac => "0e:18:fa:fe:d9:00", +# subnet => "10.27.20.0", +# fixed_address => "10.27.10.52", +# } +# } +# +# Requires: +# - puppetlabs/stdlib +# - ripienaar/concat +# +class dhcp::server ( + $ddns_update = 'none', + $authoritative = false, + $opts = [], +) { + class { '::dhcp::server::packages': } -> + class { '::dhcp::server::config': } ~> + class { '::dhcp::server::service': } } |