aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/auto_installation/manifests/init.pp55
-rw-r--r--modules/auto_installation/templates/default25
2 files changed, 80 insertions, 0 deletions
diff --git a/modules/auto_installation/manifests/init.pp b/modules/auto_installation/manifests/init.pp
new file mode 100644
index 00000000..86ff186d
--- /dev/null
+++ b/modules/auto_installation/manifests/init.pp
@@ -0,0 +1,55 @@
+# what should be possible :
+# install a base system
+# - mandriva
+# - mageia
+# - others ? ( for testing package ? )
+
+# install a server
+# - by name, with a valstart clone
+
+class auto_installation {
+ class pxe_menu {
+ package { 'syslinux':
+
+ }
+
+ $pxe_dir = "/var/lib/pxe"
+ file { $pxe_dir:
+ ensure => directory,
+ }
+
+ file { "$pxe_dir/pxelinux.0":
+ ensure => "/usr/lib/syslinux/pxelinux.0",
+ }
+
+ file { "$pxe_dir/menu.c32":
+ ensure => "/usr/lib/syslinux/menu.c32"
+ }
+
+ file { "$pxe_dir/pxelinux.cfg":
+ ensure => directory,
+ }
+
+ # default file should have exported ressources
+ file { "$pxe_dir/pxelinux.cfg/default":
+ ensure => present,
+ content => template('auto_installation/default'),
+ }
+
+ }
+
+ # define pxe_linux_entry
+ # meant to be exported
+ # name
+ # label
+ # kernel
+ # append
+
+ #
+ # define a template for autoinst
+ # - basic installation
+ # - server installation ( with server name as a parameter )
+
+
+ # TODO move here the downloader of boot.iso from libvirt module
+}
diff --git a/modules/auto_installation/templates/default b/modules/auto_installation/templates/default
new file mode 100644
index 00000000..0fbf023a
--- /dev/null
+++ b/modules/auto_installation/templates/default
@@ -0,0 +1,25 @@
+DEFAULT menu.c32
+PROMPT 10
+TIMEOUT 100
+NOESCAPE 1
+
+MENU SHIFTKEY 1
+MENU TITLE PXE Boot on <%= fqdn %>
+
+LABEL local
+ MENU LABEL Local
+ localboot 0
+<%
+# insert entry for remote boot :
+# LABEL mdv2010.1
+# MENU DEFAULT
+# MENU LABEL Install mdv 2010.1
+# kernel mdv_2010.1/vmlinuz
+#
+# append initrd=mdv_2010.1/all.rdz useless_thing_accepted=1 lang=fr automatic=int:eth0,netw:dhcp,met:ftp,ser:distrib-coffee.ipsl.jussieu.fr,dir:/pub/linux/MandrivaLinux/official/2010.1/i586/ kickstart=http://nanardon.zarb.org/~misc/auto_inst.cfg.pl
+#
+
+
+%>
+
+