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