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

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

agrego el directorio raiz del tftp

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