From f689374cb50471ab8a8b82c78a545cd76a907850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 20 Jun 2022 17:40:37 +0200 Subject: Move syslinux types into subdir. --- manifests/init.pp | 12 +----------- types/bootentry.pp | 9 +++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 types/bootentry.pp diff --git a/manifests/init.pp b/manifests/init.pp index d7bd375..4b89208 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,19 +1,9 @@ -type Bootentry = Struct[{ - 'label' => String, - 'type' => Enum['linux','com'], - # linux specific - 'extra_args' => Optional[String], - 'initrd' => Optional[String], - # com specific - 'com' => Optional[String], -}] - class syslinux ( String $kernel = 'linux', String $efi_root = '/boot/efi', String $bootentry = 'syslinux', - Hash[String,Bootentry,1] $boot_entries, + Hash[String,Syslinux::Bootentry,1] $boot_entries, String $default_boot_entry = $boot_entries.map |$k, $_| { $k }[0], ) { diff --git a/types/bootentry.pp b/types/bootentry.pp new file mode 100644 index 0000000..38fc8b1 --- /dev/null +++ b/types/bootentry.pp @@ -0,0 +1,9 @@ +type Syslinux::Bootentry = Struct[{ + 'label' => String, + 'type' => Enum['linux','com'], + # linux specific + 'extra_args' => Optional[String], + 'initrd' => Optional[String], + # com specific + 'com' => Optional[String], +}] -- cgit v1.2.3