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

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

servicio rpld.conf

File size: 4.8 KB
RevLine 
[379]1# copyright <sebas @ koumbit.org>
2# Licence: GPL
3#
4
5class di_netboot_assistant {
6
[382]7   package { [ "di-netboot-assistant" ]: ensure => installed }
8
9   # sources.list with the lastest Ubuntu releases
[379]10   file { "/etc/di-netboot-assistant/di-sources.list":
11      owner => root,
12      group => root,
13      mode => 644,
14      source => "puppet:///di_netboot_assistant/di-sources.list"
15   }
16
[382]17   # some customization of the pxe menu
[379]18   file { "/etc/di-netboot-assistant/pxelinux.HEAD":
19      owner => root,
20      group => root,
21      mode => 644,
22      source => "puppet:///di_netboot_assistant/pxelinux.HEAD"
23   }
24
[383]25   # symbolic link to generated menu
26   file  { "/var/lib/tftpboot/pxelinux.cfg/default":
[384]27      ensure => "../debian-installer/pxelinux.cfg/default"
[383]28   }
[379]29
[383]30   exec { "di_netboot_assistant_lenny":
31      command => "di-netboot-assistant install lenny --arch=amd64,i386 &>/dev/null",
32      creates => "/var/lib/tftpboot/debian-installer/lenny/i386/linux",
33      path => "/bin:/sbin:/usr/sbin:/usr/bin",
34      require => [Package["di-netboot-assistant"], File["/etc/di-netboot-assistant/di-sources.list"], File["/etc/di-netboot-assistant/pxelinux.HEAD"]]
35   }
[379]36
[383]37   exec { "di_netboot_assistant_hardy":
38      command => "di-netboot-assistant install hardy --arch=amd64,i386 &>/dev/null",
39      creates => "/var/lib/tftpboot/debian-installer/hardy/i386/linux",
40      path => "/bin:/sbin:/usr/sbin:/usr/bin",
41      require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]]
42   }
43
44   exec { "di_netboot_assistant_jaunty":
45      command => "di-netboot-assistant install jaunty --arch=amd64,i386 &>/dev/null",
46      creates => "/var/lib/tftpboot/debian-installer/jaunty/i386/linux",
47      path => "/bin:/sbin:/usr/sbin:/usr/bin",
48      require => [Package["di-netboot-assistant"], exec["di_netboot_assistant_lenny"]]
49   }
[379]50}
[395]51
52class di_netboot_assistant::debian::powerpc::daily {
53
54    package { [ "tftpd-hpa" ]: ensure => installed }
55
56    file { ["/var/lib/tftpboot/debian-installer", "/var/lib/tftpboot/debian-installer/daily", "/var/lib/tftpboot/debian-installer/daily/powerpc/"]:
57      ensure => directory,
58      owner => root,
59      group => root,
60      require => Package["tftpd-hpa"];
61    }
62
63   fetch_netboot_powerpc { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]:  }
64
65   $mirror_daily_di = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot"
66
67   define fetch_netboot_powerpc($mirror = "http://d-i.debian.org/daily-images/powerpc/daily/powerpc/netboot") {
68
69#   file { ["/var/lib/tftpboot/debian-installer/daily1", "/var/lib/tftpboot/debian-installer/daily1/powerpc/"]:
70#      ensure => directory,
71#      owner => root,
72#      group => root,
73#      require => [Package["tftpd-hpa"]];
74#    }
75
76    exec { "wget -O /var/lib/tftpboot/debian-installer/daily/powerpc/$name -q $mirror1/$name":
77      creates => "/var/lib/tftpboot/debian-installer/daily/powerpc/$name",
78      path => "/usr/bin",
79      require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/daily/powerpc/"]]
80    }
81   }
82}
83
84class di_netboot_assistant::debian::powerpc::squeeze {
85
86    file { ["/var/lib/tftpboot/debian-installer/squeeze", "/var/lib/tftpboot/debian-installer/squeeze/powerpc/"]:
87      ensure => directory,
88      owner => root,
89      group => root,
90      require => Package["tftpd-hpa"];
91    }
92
[422]93   fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: release => "squeeze";  }
[395]94
[422]95#   $mirror1 = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot"
[395]96
[422]97   define fetch_netboot_powerpc_squeeze($release,$mirror="http://debian.torredehanoi.org/debian/dists") {
98
99   exec { "wget -O /var/lib/tftpboot/debian-installer/$release/powerpc/$name -q $mirror/$release/main/installer-powerpc/current/images/powerpc/netboot/$name":
100     creates => "/var/lib/tftpboot/debian-installer/$release/powerpc/$name",
[395]101     path => "/usr/bin",
[422]102     require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/$release/powerpc/"]]
[395]103   }
104  }
105}
[424]106
107class di_netboot_assistant::rpld {
108
109## boot novell - netboot bios
110#  TODO: configure /etc/default/rpld
111#        configure /etc/rpld.conf for pxe booting
112#        http://help.lockergnome.com/linux/Netbooting-RPL--ftopict415270.html
113#       http://etherboot.org/wiki/rplchaining
114#
115    package { [ "rpld" ]: ensure => installed }
116
117   # rpld.conf configuration.
118   file { "/etc/rpld.conf":
119      owner => root,
120      group => root,
121      mode => 644,
122      source => "puppet:///di_netboot_assistant/rpld.conf"
123   }
124
125
126   # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/
127   # gPXE 0.9.9+
128   # pxe bootstraploader / all driver
129   file { "/var/lib/tftpboot/gpxe.pxe":
130      owner => root,
131      group => root,
132      mode => 644,
133      source => "puppet:///di_netboot_assistant/gpxe.pxe"
134   }
135
136}
Note: See TracBrowser for help on using the repository browser.