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

Last change on this file since 546 was 543, checked in by sebas, 15 years ago

agregamos el proximo release de ubuntu 10.04 (lucid) como opcion de instalacion en el menu pxe

File size: 6.9 KB
Line 
1# copyright <sebas @ koumbit.org>
2# Licence: GPL
3#
4# TODO: updatemenu missing...
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   }
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
90class 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
122class 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
145class di_netboot_assistant::rpld {
146
147## boot novell - netboot bios
148#  TODO: configure /etc/default/rpld
149#        configure /etc/rpld.conf for pxe booting
150#        http://help.lockergnome.com/linux/Netbooting-RPL--ftopict415270.html
151#       http://etherboot.org/wiki/rplchaining
152#
153    package { [ "rpld" ]: ensure => installed }
154
155   service { "rpld":
156      enable => true,
157      ensure => running,
158      subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ],
159   }
160
161
162   # rpld.conf configuration.
163   file { "/etc/rpld.conf":
164      owner => root,
165      group => root,
166      mode => 644,
167      source => "puppet:///di_netboot_assistant/rpld.conf"
168   }
169
170   file { "/etc/default/rpld":
171      owner => root,
172      group => root,
173      mode => 644,
174      source => "puppet:///di_netboot_assistant/rpld"
175   }
176
177   # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/
178   # gPXE 0.9.9+
179   # pxe bootstraploader / all driver
180   file { "/var/lib/tftpboot/gpxe.pxe":
181      owner => root,
182      group => root,
183      mode => 644,
184      source => "puppet:///di_netboot_assistant/gpxe.pxe"
185   }
186
187}
Note: See TracBrowser for help on using the repository browser.