1 |
# 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 |
class variables { |
12 |
$pxe_dir = "/var/lib/pxe" |
13 |
# 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 |
} |
17 |
|
18 |
class pxe_menu inherits variables { |
19 |
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 |
# 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 |
|
44 |
|
45 |
# default file should have exported ressources |
46 |
file { "$pxe_dir/pxelinux.cfg/default": |
47 |
ensure => present, |
48 |
content => template('auto_installation/default'), |
49 |
} |
50 |
|
51 |
} |
52 |
|
53 |
# define pxe_linux_entry |
54 |
# meant to be exported |
55 |
# name |
56 |
# label |
57 |
# kernel |
58 |
# append |
59 |
|
60 |
# |
61 |
# define a template for autoinst |
62 |
# - basic installation |
63 |
# - server installation ( with server name as a parameter ) |
64 |
|
65 |
|
66 |
# TODO move here the downloader of boot.iso from libvirt module |
67 |
} |