From 06e9cedeb67c75eca4053f873b7ad83a2a00d5a8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 9 Nov 2018 17:36:56 -0700 Subject: note that --os-variant is optional --- src/Propellor/Property/Libvirt.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Propellor/Property/Libvirt.hs') diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs index de08fcdb..aec9f3c8 100644 --- a/src/Propellor/Property/Libvirt.hs +++ b/src/Propellor/Property/Libvirt.hs @@ -140,6 +140,9 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h = -- ==== utility functions ==== +-- The --os-variant property is optional, per virt-install(1), so return Nothing +-- if there isn't a known correct value. The VM will still be defined. Pass +-- the value if we can, though, to optimise the generated XML for the host's OS osVariant :: Host -> Maybe String osVariant h = hostSystem h >>= \s -> case s of System (Debian _ (Stable "jessie")) _ -> Just "debian8" -- cgit v1.2.3