1 | # copyright <sebas @ koumbit.org> |
---|
2 | # Licence: GPL |
---|
3 | # |
---|
4 | |
---|
5 | class di_netboot_assistant { |
---|
6 | |
---|
7 | package { [ "di-netboot-assistant" ]: ensure => installed } |
---|
8 | |
---|
9 | # sources.list with the lastest Ubuntu releases |
---|
10 | file { "/etc/di-netboot-assistant/di-sources.list": |
---|
11 | owner => root, |
---|
12 | group => root, |
---|
13 | mode => 644, |
---|
14 | source => "puppet:///di_netboot_assistant/di-sources.list" |
---|
15 | } |
---|
16 | |
---|
17 | # some customization of the pxe menu |
---|
18 | file { "/etc/di-netboot-assistant/pxelinux.HEAD": |
---|
19 | owner => root, |
---|
20 | group => root, |
---|
21 | mode => 644, |
---|
22 | source => "puppet:///di_netboot_assistant/pxelinux.HEAD" |
---|
23 | } |
---|
24 | |
---|
25 | # symbolic link to generated menu |
---|
26 | file { |
---|
27 | "/var/lib/tftpboot/pxelinux.0": |
---|
28 | ensure => "debian-installer/pxelinux.0"; |
---|
29 | "/var/lib/tftpboot/pxelinux.cfg": |
---|
30 | ensure => directory, |
---|
31 | owner => "root", group => "root", mode => "755"; |
---|
32 | "/var/lib/tftpboot/pxelinux.cfg/default": |
---|
33 | ensure => "../debian-installer/pxelinux.cfg/default"; |
---|
34 | } |
---|
35 | |
---|
36 | exec { "di_netboot_assistant_lenny": |
---|
37 | command => "di-netboot-assistant install lenny --arch=amd64,i386 &>/dev/null", |
---|
38 | creates => "/var/lib/tftpboot/debian-installer/lenny/i386/linux", |
---|
39 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
40 | require => [Package["di-netboot-assistant"], File["/etc/di-netboot-assistant/di-sources.list"], File["/etc/di-netboot-assistant/pxelinux.HEAD"]] |
---|
41 | } |
---|
42 | |
---|
43 | exec { "di_netboot_assistant_hardy": |
---|
44 | command => "di-netboot-assistant install hardy --arch=amd64,i386 &>/dev/null", |
---|
45 | creates => "/var/lib/tftpboot/debian-installer/hardy/i386/linux", |
---|
46 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
47 | require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]] |
---|
48 | } |
---|
49 | |
---|
50 | exec { "di_netboot_assistant_jaunty": |
---|
51 | command => "di-netboot-assistant install jaunty --arch=amd64,i386 &>/dev/null", |
---|
52 | creates => "/var/lib/tftpboot/debian-installer/jaunty/i386/linux", |
---|
53 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
54 | require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]] |
---|
55 | } |
---|
56 | } |
---|
57 | |
---|
58 | class di_netboot_assistant::debian::powerpc::daily { |
---|
59 | |
---|
60 | package { [ "tftpd-hpa" ]: ensure => installed } |
---|
61 | |
---|
62 | file { ["/var/lib/tftpboot/debian-installer", "/var/lib/tftpboot/debian-installer/daily", "/var/lib/tftpboot/debian-installer/daily/powerpc/"]: |
---|
63 | ensure => directory, |
---|
64 | owner => root, |
---|
65 | group => root, |
---|
66 | require => Package["tftpd-hpa"]; |
---|
67 | } |
---|
68 | |
---|
69 | fetch_netboot_powerpc { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: } |
---|
70 | |
---|
71 | $mirror_daily_di = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot" |
---|
72 | |
---|
73 | define fetch_netboot_powerpc($mirror = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot") { |
---|
74 | |
---|
75 | # file { ["/var/lib/tftpboot/debian-installer/daily1", "/var/lib/tftpboot/debian-installer/daily1/powerpc/"]: |
---|
76 | # ensure => directory, |
---|
77 | # owner => root, |
---|
78 | # group => root, |
---|
79 | # require => [Package["tftpd-hpa"]]; |
---|
80 | # } |
---|
81 | |
---|
82 | exec { "wget -O /var/lib/tftpboot/debian-installer/daily/powerpc/$name -q $mirror1/$name": |
---|
83 | creates => "/var/lib/tftpboot/debian-installer/daily/powerpc/$name", |
---|
84 | path => "/usr/bin", |
---|
85 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/daily/powerpc/"]] |
---|
86 | } |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | class di_netboot_assistant::debian::powerpc::squeeze { |
---|
91 | |
---|
92 | file { ["/var/lib/tftpboot/debian-installer/squeeze", "/var/lib/tftpboot/debian-installer/squeeze/powerpc/"]: |
---|
93 | ensure => directory, |
---|
94 | owner => root, |
---|
95 | group => root, |
---|
96 | require => Package["tftpd-hpa"]; |
---|
97 | } |
---|
98 | |
---|
99 | fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: release => "squeeze"; } |
---|
100 | |
---|
101 | # $mirror1 = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot" |
---|
102 | |
---|
103 | define fetch_netboot_powerpc_squeeze($release,$mirror="http://debian.torredehanoi.org/debian/dists") { |
---|
104 | |
---|
105 | exec { "wget -O /var/lib/tftpboot/debian-installer/$release/powerpc/$name -q $mirror/$release/main/installer-powerpc/current/images/powerpc/netboot/$name": |
---|
106 | creates => "/var/lib/tftpboot/debian-installer/$release/powerpc/$name", |
---|
107 | path => "/usr/bin", |
---|
108 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/$release/powerpc/"]] |
---|
109 | } |
---|
110 | } |
---|
111 | } |
---|
112 | |
---|
113 | class di_netboot_assistant::rpld { |
---|
114 | |
---|
115 | ## boot novell - netboot bios |
---|
116 | # TODO: configure /etc/default/rpld |
---|
117 | # configure /etc/rpld.conf for pxe booting |
---|
118 | # http://help.lockergnome.com/linux/Netbooting-RPL--ftopict415270.html |
---|
119 | # http://etherboot.org/wiki/rplchaining |
---|
120 | # |
---|
121 | package { [ "rpld" ]: ensure => installed } |
---|
122 | |
---|
123 | service { "rpld": |
---|
124 | enable => true, |
---|
125 | ensure => running, |
---|
126 | subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ], |
---|
127 | } |
---|
128 | |
---|
129 | |
---|
130 | # rpld.conf configuration. |
---|
131 | file { "/etc/rpld.conf": |
---|
132 | owner => root, |
---|
133 | group => root, |
---|
134 | mode => 644, |
---|
135 | source => "puppet:///di_netboot_assistant/rpld.conf" |
---|
136 | } |
---|
137 | |
---|
138 | file { "/etc/default/rpld": |
---|
139 | owner => root, |
---|
140 | group => root, |
---|
141 | mode => 644, |
---|
142 | source => "puppet:///di_netboot_assistant/rpld" |
---|
143 | } |
---|
144 | |
---|
145 | # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/ |
---|
146 | # gPXE 0.9.9+ |
---|
147 | # pxe bootstraploader / all driver |
---|
148 | file { "/var/lib/tftpboot/gpxe.pxe": |
---|
149 | owner => root, |
---|
150 | group => root, |
---|
151 | mode => 644, |
---|
152 | source => "puppet:///di_netboot_assistant/gpxe.pxe" |
---|
153 | } |
---|
154 | |
---|
155 | } |
---|