aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auto_installation
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-04-01 01:44:38 +0000
committerMichael Scherer <misc@mageia.org>2011-04-01 01:44:38 +0000
commit027555fb663b3ea375fe8173aa3bfd0fdb9f30ec (patch)
treeab019b6dff35364b97f54918fd9a7586e7591ac6 /modules/auto_installation
parentac644e624e78510a3173c542057c27a1d2395ae3 (diff)
downloadpuppet-027555fb663b3ea375fe8173aa3bfd0fdb9f30ec.tar
puppet-027555fb663b3ea375fe8173aa3bfd0fdb9f30ec.tar.gz
puppet-027555fb663b3ea375fe8173aa3bfd0fdb9f30ec.tar.bz2
puppet-027555fb663b3ea375fe8173aa3bfd0fdb9f30ec.tar.xz
puppet-027555fb663b3ea375fe8173aa3bfd0fdb9f30ec.zip
- use exported ressource to populate the pxe menu
Diffstat (limited to 'modules/auto_installation')
-rw-r--r--modules/auto_installation/manifests/init.pp22
-rw-r--r--modules/auto_installation/templates/default16
2 files changed, 23 insertions, 15 deletions
diff --git a/modules/auto_installation/manifests/init.pp b/modules/auto_installation/manifests/init.pp
index fb327518..19c20680 100644
--- a/modules/auto_installation/manifests/init.pp
+++ b/modules/auto_installation/manifests/init.pp
@@ -41,13 +41,29 @@ class auto_installation {
ensure => directory,
}
-
+ # TODO make it tag aware
+ $menu_entries = list_exported_ressources('Auto_installation::Pxe_menu_base')
# default file should have exported ressources
file { "$pxe_dir/pxelinux.cfg/default":
ensure => present,
content => template('auto_installation/default'),
- }
-
+ }
+ Auto_installation::Pxe_menu_base <<| tag == $fqdn |>>
+ }
+
+ define pxe_menu_base($content) {
+ include auto_installation::variables
+ file { "$auto_installation::variables::pxe_menu_dir/$name":
+ ensure => present,
+ content => $content,
+ }
+ }
+
+ define pxe_menu_entry($kernel_path, $append) {
+ @@auto_installation::pxe_menu_base { $name:
+ tag => $fqdn,
+ content => template('auto_installation/menu'),
+ }
}
# define pxe_linux_entry
diff --git a/modules/auto_installation/templates/default b/modules/auto_installation/templates/default
index 0fbf023a..f8b8e82b 100644
--- a/modules/auto_installation/templates/default
+++ b/modules/auto_installation/templates/default
@@ -9,17 +9,9 @@ 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
-#
-
-
-%>
+<% for m in menu_entries %>
+INCLUDE pxelinux.cfg/m/<%= m %>
+<% end %>
+