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

Last change on this file since 479 was 479, checked in by sebas, 14 years ago

nueva entrada para el menu de boot

File size: 5.4 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_hardy":
47      command => "di-netboot-assistant install hardy --arch=amd64,i386 &>/dev/null",
48      creates => "/var/lib/tftpboot/debian-installer/hardy/i386/linux",
49      path => "/bin:/sbin:/usr/sbin:/usr/bin",
50      require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]]
51   }
52
53   exec { "di_netboot_assistant_jaunty":
54      command => "di-netboot-assistant install jaunty --arch=amd64,i386 &>/dev/null",
55      creates => "/var/lib/tftpboot/debian-installer/jaunty/i386/linux",
56      path => "/bin:/sbin:/usr/sbin:/usr/bin",
57      require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]]
58   }
59}
60
61class di_netboot_assistant::debian::powerpc::daily {
62
63    package { [ "tftpd-hpa" ]: ensure => installed }
64
65    file { ["/var/lib/tftpboot/debian-installer", "/var/lib/tftpboot/debian-installer/daily", "/var/lib/tftpboot/debian-installer/daily/powerpc/"]:
66      ensure => directory,
67      owner => root,
68      group => root,
69      require => Package["tftpd-hpa"];
70    }
71
72   fetch_netboot_powerpc { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]:  }
73
74   $mirror_daily_di = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot"
75
76   define fetch_netboot_powerpc($mirror = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot") {
77
78#   file { ["/var/lib/tftpboot/debian-installer/daily1", "/var/lib/tftpboot/debian-installer/daily1/powerpc/"]:
79#      ensure => directory,
80#      owner => root,
81#      group => root,
82#      require => [Package["tftpd-hpa"]];
83#    }
84
85    exec { "wget -O /var/lib/tftpboot/debian-installer/daily/powerpc/$name -q $mirror1/$name":
86      creates => "/var/lib/tftpboot/debian-installer/daily/powerpc/$name",
87      path => "/usr/bin",
88      require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/daily/powerpc/"]]
89    }
90   }
91}
92
93class di_netboot_assistant::debian::powerpc::squeeze {
94
95    file { ["/var/lib/tftpboot/debian-installer/squeeze", "/var/lib/tftpboot/debian-installer/squeeze/powerpc/"]:
96      ensure => directory,
97      owner => root,
98      group => root,
99      require => Package["tftpd-hpa"];
100    }
101
102   fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: release => "squeeze";  }
103
104#   $mirror1 = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot"
105
106   define fetch_netboot_powerpc_squeeze($release,$mirror="http://debian.torredehanoi.org/debian/dists") {
107
108   exec { "wget -O /var/lib/tftpboot/debian-installer/$release/powerpc/$name -q $mirror/$release/main/installer-powerpc/current/images/powerpc/netboot/$name":
109     creates => "/var/lib/tftpboot/debian-installer/$release/powerpc/$name",
110     path => "/usr/bin",
111     require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/$release/powerpc/"]]
112   }
113  }
114}
115
116class di_netboot_assistant::rpld {
117
118## boot novell - netboot bios
119#  TODO: configure /etc/default/rpld
120#        configure /etc/rpld.conf for pxe booting
121#        http://help.lockergnome.com/linux/Netbooting-RPL--ftopict415270.html
122#       http://etherboot.org/wiki/rplchaining
123#
124    package { [ "rpld" ]: ensure => installed }
125
126   service { "rpld":
127      enable => true,
128      ensure => running,
129      subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ],
130   }
131
132
133   # rpld.conf configuration.
134   file { "/etc/rpld.conf":
135      owner => root,
136      group => root,
137      mode => 644,
138      source => "puppet:///di_netboot_assistant/rpld.conf"
139   }
140
141   file { "/etc/default/rpld":
142      owner => root,
143      group => root,
144      mode => 644,
145      source => "puppet:///di_netboot_assistant/rpld"
146   }
147
148   # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/
149   # gPXE 0.9.9+
150   # pxe bootstraploader / all driver
151   file { "/var/lib/tftpboot/gpxe.pxe":
152      owner => root,
153      group => root,
154      mode => 644,
155      source => "puppet:///di_netboot_assistant/gpxe.pxe"
156   }
157
158}
Note: See TracBrowser for help on using the repository browser.