/[adm]/puppet/modules/auto_installation/manifests/init.pp
ViewVC logotype

Annotation of /puppet/modules/auto_installation/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1445 - (hide annotations) (download)
Fri Apr 1 01:44:38 2011 UTC (13 years, 2 months ago) by misc
File size: 2260 byte(s)
- use exported ressource to populate the pxe menu
1 misc 1442 # what should be possible :
2     # install a base system
3     # - mandriva
4     # - mageia
5     # - others ? ( for testing package ? )
6    
7     # install a server
8     # - by name, with a valstart clone
9    
10     class auto_installation {
11 misc 1443 class variables {
12     $pxe_dir = "/var/lib/pxe"
13 misc 1444 # m/ for menu. There is limitation on the path length so
14     # while we will likely not hit the limit, it may be easier
15     $pxe_menu_dir = "$pxe_dir/pxelinux.cfg/m/"
16 misc 1443 }
17    
18     class pxe_menu inherits variables {
19 misc 1442 package { 'syslinux':
20    
21     }
22    
23     file { $pxe_dir:
24     ensure => directory,
25     }
26    
27     file { "$pxe_dir/pxelinux.0":
28     ensure => "/usr/lib/syslinux/pxelinux.0",
29     }
30    
31     file { "$pxe_dir/menu.c32":
32     ensure => "/usr/lib/syslinux/menu.c32"
33     }
34    
35     file { "$pxe_dir/pxelinux.cfg":
36     ensure => directory,
37     }
38 misc 1444 # m for menu, there is some limitation on the path lenght so I
39     # prefer to
40     file { "$pxe_menu_dir":
41     ensure => directory,
42     }
43 misc 1442
44 misc 1445 # TODO make it tag aware
45     $menu_entries = list_exported_ressources('Auto_installation::Pxe_menu_base')
46 misc 1442 # default file should have exported ressources
47     file { "$pxe_dir/pxelinux.cfg/default":
48     ensure => present,
49     content => template('auto_installation/default'),
50 misc 1445 }
51     Auto_installation::Pxe_menu_base <<| tag == $fqdn |>>
52 misc 1442 }
53    
54 misc 1445 define pxe_menu_base($content) {
55     include auto_installation::variables
56     file { "$auto_installation::variables::pxe_menu_dir/$name":
57     ensure => present,
58     content => $content,
59     }
60     }
61    
62     define pxe_menu_entry($kernel_path, $append) {
63     @@auto_installation::pxe_menu_base { $name:
64     tag => $fqdn,
65     content => template('auto_installation/menu'),
66     }
67     }
68    
69 misc 1442 # define pxe_linux_entry
70     # meant to be exported
71     # name
72     # label
73     # kernel
74     # append
75    
76     #
77     # define a template for autoinst
78     # - basic installation
79     # - server installation ( with server name as a parameter )
80    
81    
82     # TODO move here the downloader of boot.iso from libvirt module
83     }

  ViewVC Help
Powered by ViewVC 1.1.30