diff options
-rw-r--r-- | modules/auto_installation/manifests/init.pp | 22 | ||||
-rw-r--r-- | modules/auto_installation/templates/default | 16 |
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 %> + |