[379] | 1 | # copyright <sebas @ koumbit.org> |
---|
[672] | 2 | # < josx @ interorganic.com.ar > |
---|
[379] | 3 | # Licence: GPL |
---|
| 4 | # |
---|
| 5 | |
---|
| 6 | class di_netboot_assistant { |
---|
| 7 | |
---|
[382] | 8 | package { [ "di-netboot-assistant" ]: ensure => installed } |
---|
| 9 | |
---|
| 10 | # sources.list with the lastest Ubuntu releases |
---|
[379] | 11 | file { "/etc/di-netboot-assistant/di-sources.list": |
---|
[479] | 12 | require => Package["di-netboot-assistant"], |
---|
[379] | 13 | owner => root, |
---|
| 14 | group => root, |
---|
| 15 | mode => 644, |
---|
| 16 | source => "puppet:///di_netboot_assistant/di-sources.list" |
---|
| 17 | } |
---|
| 18 | |
---|
[382] | 19 | # some customization of the pxe menu |
---|
[379] | 20 | file { "/etc/di-netboot-assistant/pxelinux.HEAD": |
---|
[479] | 21 | require => Package["di-netboot-assistant"], |
---|
[379] | 22 | owner => root, |
---|
| 23 | group => root, |
---|
| 24 | mode => 644, |
---|
[672] | 25 | source => "puppet:///di_netboot_assistant/pxelinux.HEAD", |
---|
| 26 | before => Exec["updatemenu"] |
---|
[379] | 27 | } |
---|
[672] | 28 | |
---|
| 29 | exec { "updatemenu": |
---|
| 30 | command => "di-netboot-assistant rebuild-menu", |
---|
| 31 | path => "/bin:/sbin:/usr/sbin:/usr/bin", |
---|
| 32 | } |
---|
[379] | 33 | |
---|
[383] | 34 | # symbolic link to generated menu |
---|
[452] | 35 | file { |
---|
[681] | 36 | "/var/lib/tftpboot": |
---|
| 37 | ensure => directory, |
---|
| 38 | owner => "root", group => "root", mode => "755"; |
---|
[452] | 39 | "/var/lib/tftpboot/pxelinux.cfg": |
---|
| 40 | ensure => directory, |
---|
| 41 | owner => "root", group => "root", mode => "755"; |
---|
[681] | 42 | "/var/lib/tftpboot/pxelinux.0": |
---|
| 43 | ensure => "debian-installer/pxelinux.0"; |
---|
[452] | 44 | "/var/lib/tftpboot/pxelinux.cfg/default": |
---|
| 45 | ensure => "../debian-installer/pxelinux.cfg/default"; |
---|
[383] | 46 | } |
---|
[379] | 47 | |
---|
[383] | 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 | } |
---|
[379] | 54 | |
---|
[497] | 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 | |
---|
[383] | 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 | } |
---|
[497] | 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 | |
---|
[543] | 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 | |
---|
[379] | 97 | } |
---|
[395] | 98 | |
---|
| 99 | class 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 | |
---|
| 131 | class di_netboot_assistant::debian::powerpc::squeeze { |
---|
| 132 | |
---|
[595] | 133 | file { ["/var/lib/tftpboot/debian-installer/squeeze", "/var/lib/tftpboot/debian-installer/squeeze/powerpc"]: |
---|
[395] | 134 | ensure => directory, |
---|
| 135 | owner => root, |
---|
| 136 | group => root, |
---|
| 137 | require => Package["tftpd-hpa"]; |
---|
| 138 | } |
---|
| 139 | |
---|
[422] | 140 | fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: release => "squeeze"; } |
---|
[395] | 141 | |
---|
[422] | 142 | # $mirror1 = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot" |
---|
[395] | 143 | |
---|
[422] | 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", |
---|
[395] | 148 | path => "/usr/bin", |
---|
[595] | 149 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/$release/powerpc"]] |
---|
[395] | 150 | } |
---|
| 151 | } |
---|
| 152 | } |
---|
[424] | 153 | |
---|
[595] | 154 | class 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 | |
---|
[424] | 176 | class 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 | |
---|
[425] | 186 | service { "rpld": |
---|
| 187 | enable => true, |
---|
| 188 | ensure => running, |
---|
| 189 | subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ], |
---|
| 190 | } |
---|
| 191 | |
---|
| 192 | |
---|
[424] | 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 | |
---|
[425] | 201 | file { "/etc/default/rpld": |
---|
| 202 | owner => root, |
---|
| 203 | group => root, |
---|
| 204 | mode => 644, |
---|
| 205 | source => "puppet:///di_netboot_assistant/rpld" |
---|
| 206 | } |
---|
[424] | 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 | } |
---|