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 | } |
---|
82 | |
---|
83 | class di_netboot_assistant::debian::powerpc::daily { |
---|
84 | |
---|
85 | package { [ "tftpd-hpa" ]: ensure => installed } |
---|
86 | |
---|
87 | file { ["/var/lib/tftpboot/debian-installer", "/var/lib/tftpboot/debian-installer/daily", "/var/lib/tftpboot/debian-installer/daily/powerpc/"]: |
---|
88 | ensure => directory, |
---|
89 | owner => root, |
---|
90 | group => root, |
---|
91 | require => Package["tftpd-hpa"]; |
---|
92 | } |
---|
93 | |
---|
94 | fetch_netboot_powerpc { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: } |
---|
95 | |
---|
96 | $mirror_daily_di = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot" |
---|
97 | |
---|
98 | define fetch_netboot_powerpc($mirror = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot") { |
---|
99 | |
---|
100 | # file { ["/var/lib/tftpboot/debian-installer/daily1", "/var/lib/tftpboot/debian-installer/daily1/powerpc/"]: |
---|
101 | # ensure => directory, |
---|
102 | # owner => root, |
---|
103 | # group => root, |
---|
104 | # require => [Package["tftpd-hpa"]]; |
---|
105 | # } |
---|
106 | |
---|
107 | exec { "wget -O /var/lib/tftpboot/debian-installer/daily/powerpc/$name -q $mirror1/$name": |
---|
108 | creates => "/var/lib/tftpboot/debian-installer/daily/powerpc/$name", |
---|
109 | path => "/usr/bin", |
---|
110 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/daily/powerpc/"]] |
---|
111 | } |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | class di_netboot_assistant::debian::powerpc::squeeze { |
---|
116 | |
---|
117 | file { ["/var/lib/tftpboot/debian-installer/squeeze", "/var/lib/tftpboot/debian-installer/squeeze/powerpc/"]: |
---|
118 | ensure => directory, |
---|
119 | owner => root, |
---|
120 | group => root, |
---|
121 | require => Package["tftpd-hpa"]; |
---|
122 | } |
---|
123 | |
---|
124 | fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: release => "squeeze"; } |
---|
125 | |
---|
126 | # $mirror1 = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot" |
---|
127 | |
---|
128 | define fetch_netboot_powerpc_squeeze($release,$mirror="http://debian.torredehanoi.org/debian/dists") { |
---|
129 | |
---|
130 | exec { "wget -O /var/lib/tftpboot/debian-installer/$release/powerpc/$name -q $mirror/$release/main/installer-powerpc/current/images/powerpc/netboot/$name": |
---|
131 | creates => "/var/lib/tftpboot/debian-installer/$release/powerpc/$name", |
---|
132 | path => "/usr/bin", |
---|
133 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/$release/powerpc/"]] |
---|
134 | } |
---|
135 | } |
---|
136 | } |
---|
137 | |
---|
138 | class di_netboot_assistant::rpld { |
---|
139 | |
---|
140 | ## boot novell - netboot bios |
---|
141 | # TODO: configure /etc/default/rpld |
---|
142 | # configure /etc/rpld.conf for pxe booting |
---|
143 | # http://help.lockergnome.com/linux/Netbooting-RPL--ftopict415270.html |
---|
144 | # http://etherboot.org/wiki/rplchaining |
---|
145 | # |
---|
146 | package { [ "rpld" ]: ensure => installed } |
---|
147 | |
---|
148 | service { "rpld": |
---|
149 | enable => true, |
---|
150 | ensure => running, |
---|
151 | subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ], |
---|
152 | } |
---|
153 | |
---|
154 | |
---|
155 | # rpld.conf configuration. |
---|
156 | file { "/etc/rpld.conf": |
---|
157 | owner => root, |
---|
158 | group => root, |
---|
159 | mode => 644, |
---|
160 | source => "puppet:///di_netboot_assistant/rpld.conf" |
---|
161 | } |
---|
162 | |
---|
163 | file { "/etc/default/rpld": |
---|
164 | owner => root, |
---|
165 | group => root, |
---|
166 | mode => 644, |
---|
167 | source => "puppet:///di_netboot_assistant/rpld" |
---|
168 | } |
---|
169 | |
---|
170 | # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/ |
---|
171 | # gPXE 0.9.9+ |
---|
172 | # pxe bootstraploader / all driver |
---|
173 | file { "/var/lib/tftpboot/gpxe.pxe": |
---|
174 | owner => root, |
---|
175 | group => root, |
---|
176 | mode => 644, |
---|
177 | source => "puppet:///di_netboot_assistant/gpxe.pxe" |
---|
178 | } |
---|
179 | |
---|
180 | } |
---|