aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-04-01 00:44:15 +0000
committerMichael Scherer <misc@mageia.org>2011-04-01 00:44:15 +0000
commit022bdb8d2b48fec2245e64725f73a58990efd468 (patch)
tree029caec1101573e5a6e8ffac3bfe759fc54d493f
parent13dad16194bd35c60bd51ce2aaa6a813e8238574 (diff)
downloadpuppet-022bdb8d2b48fec2245e64725f73a58990efd468.tar
puppet-022bdb8d2b48fec2245e64725f73a58990efd468.tar.gz
puppet-022bdb8d2b48fec2245e64725f73a58990efd468.tar.bz2
puppet-022bdb8d2b48fec2245e64725f73a58990efd468.tar.xz
puppet-022bdb8d2b48fec2245e64725f73a58990efd468.zip
add basic structure for pxe boot
-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
+#
+
+
+%>
+
+