From 86a1ac4e4fb84c74d71940d48a710740fe362ccb Mon Sep 17 00:00:00 2001 From: Peter Bech Foldberg Date: Thu, 17 Aug 2023 13:36:26 +0200 Subject: [PATCH] Added possibility to use both 'present' and 'latest' package_version for Debian systems when using absolute_path --- manifests/install.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 0d80aedf..c6058ad5 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -61,7 +61,10 @@ $_install_options = $install_options if $::puppet_agent::absolute_source { # absolute_source means we use dpkg on debian based platforms - $_package_version = 'present' + if ($package_version != 'present' and $package_version != 'latest') { + fail('When using $absolute_source on Debian, $package_version must be set to "present" or "latest"') + } + $_package_version = $package_version $_provider = 'dpkg' # The source package should have been downloaded by puppet_agent::prepare::package to the local_packages_dir $_source = "${::puppet_agent::params::local_packages_dir}/${::puppet_agent::prepare::package::package_file_name}"