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

Last change on this file since 449 was 425, checked in by sebas, 15 years ago

para levantar al boot + archivo de config

File size: 5.1 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
[425]117   service { "rpld":
118      enable => true,
119      ensure => running,
120      subscribe => [ Package["rpld"], File["/etc/rpld.conf"], File["/etc/default/rpld"] ],
121   }
122
123
[424]124   # rpld.conf configuration.
125   file { "/etc/rpld.conf":
126      owner => root,
127      group => root,
128      mode => 644,
129      source => "puppet:///di_netboot_assistant/rpld.conf"
130   }
131
[425]132   file { "/etc/default/rpld":
133      owner => root,
134      group => root,
135      mode => 644,
136      source => "puppet:///di_netboot_assistant/rpld"
137   }
[424]138
139   # download the http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/contrib/rom-o-matic/
140   # gPXE 0.9.9+
141   # pxe bootstraploader / all driver
142   file { "/var/lib/tftpboot/gpxe.pxe":
143      owner => root,
144      group => root,
145      mode => 644,
146      source => "puppet:///di_netboot_assistant/gpxe.pxe"
147   }
148
149}
Note: See TracBrowser for help on using the repository browser.