source: trunk/puppet/modules/di_netboot_assistant/manifests/init.pp @ 672

Last change on this file since 672 was 672, checked in by josx@…, 12 years ago

Agregando la actualizacion del menu de netboot

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