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