[379] | 1 | # copyright <sebas @ koumbit.org> |
---|
| 2 | # Licence: GPL |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | class 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 | |
---|
| 52 | class 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 | |
---|
| 84 | class 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 | |
---|
| 93 | fetch_netboot_powerpc_squeeze { [ "boot.msg", "initrd.gz", "vmlinux", "yaboot", "yaboot.conf" ]: } |
---|
| 94 | |
---|
| 95 | define fetch_netboot_powerpc_squeeze($mirror = "http://debian.torredehanoi.org/debian/dists/squeeze/main/installer-powerpc/current/images/powerpc/netboot") { |
---|
| 96 | |
---|
| 97 | exec { "wget -O /var/lib/tftpboot/debian-installer/squeeze/powerpc/$name -q $mirro1/$name": |
---|
| 98 | creates => "/var/lib/tftpboot/debian-installer/squeeze/powerpc/$name", |
---|
| 99 | path => "/usr/bin", |
---|
| 100 | require => [Package["tftpd-hpa"], File["/var/lib/tftpboot/debian-installer/squeeze/powerpc/"]] |
---|
| 101 | } |
---|
| 102 | } |
---|
| 103 | } |
---|