]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding dhclient class
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Nov 2012 02:22:28 +0000 (00:22 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Nov 2012 02:22:28 +0000 (00:22 -0200)
manifests/init.pp
manifests/subsystems/dhclient.pp [new file with mode: 0644]
templates/dhcp/dhclient.conf.erb [new file with mode: 0644]

index 1d4006b5ca4001800c7ee2dc953fc81b82e6a4f2..a4a94fa036c1aadf0d8dd0222b185c2c526331fb 100644 (file)
@@ -79,6 +79,7 @@ import "subsystems/profile.pp"
 import "subsystems/schroot.pp"
 import "subsystems/resolver.pp"
 import "subsystems/domain.pp"
+import "subsystems/dhclient.pp"
 import "subsystems/utils.pp"
 import "subsystems/utils/debian.pp"
 import "subsystems/utils/desktop.pp"
diff --git a/manifests/subsystems/dhclient.pp b/manifests/subsystems/dhclient.pp
new file mode 100644 (file)
index 0000000..7c4ebf4
--- /dev/null
@@ -0,0 +1,14 @@
+class dhclient {
+  package { 'isc-dhcp-client':
+    ensure => present,
+  }
+
+  file { '/etc/dhcp/dhclient.conf':
+    ensure  => present,
+    owner   => root,
+    group   => root,
+    mode    => 0644,
+    require => Package['isc-dhcp-client'],
+    content => template('nodo/dhcp/dhclient.conf.erb'),
+  }
+}
diff --git a/templates/dhcp/dhclient.conf.erb b/templates/dhcp/dhclient.conf.erb
new file mode 100644 (file)
index 0000000..39eeeb5
--- /dev/null
@@ -0,0 +1,57 @@
+# Configuration file for /sbin/dhclient, which is included in Debian's
+#      dhcp3-client package.
+#
+# This is a sample configuration file for dhclient. See dhclient.conf's
+#      man page for more information about the syntax of this file
+#      and a more comprehensive list of the parameters understood by
+#      dhclient.
+#
+# Normally, if the DHCP server provides reasonable information and does
+#      not leave anything out (like the domain name, for example), then
+#      few changes must be made to this file, if any.
+#
+
+option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
+
+#send host-name "andare.fugue.com";
+#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
+#send dhcp-lease-time 3600;
+#prepend domain-name-servers 127.0.0.1;
+
+# Force a domain name, otherwise facter and other configurations might break.
+supersede domain-name "<%= domain %>";
+supersede domain-search "<%= domain %>";
+
+request subnet-mask, broadcast-address, time-offset, routers,
+       domain-name, domain-name-servers, domain-search, host-name,
+       netbios-name-servers, netbios-scope, interface-mtu,
+       rfc3442-classless-static-routes;
+#require subnet-mask, domain-name-servers;
+#timeout 60;
+#retry 60;
+#reboot 10;
+#select-timeout 5;
+#initial-interval 2;
+#script "/etc/dhcp3/dhclient-script";
+#media "-link0 -link1 -link2", "link0 link1";
+#reject 192.33.137.209;
+
+#alias {
+#  interface "eth0";
+#  fixed-address 192.5.5.213;
+#  option subnet-mask 255.255.255.255;
+#}
+
+#lease {
+#  interface "eth0";
+#  fixed-address 192.33.137.200;
+#  medium "link0 link1";
+#  option host-name "andare.swiftmedia.com";
+#  option subnet-mask 255.255.255.0;
+#  option broadcast-address 192.33.137.255;
+#  option routers 192.33.137.250;
+#  option domain-name-servers 127.0.0.1;
+#  renew 2 2000/1/12 00:00:01;
+#  rebind 2 2000/1/12 00:00:01;
+#  expire 2 2000/1/12 00:00:01;
+#}