2015-03-25 18:08:13 +01:00
|
|
|
#if you need to specify a release
|
2015-04-06 20:29:02 +02:00
|
|
|
$rel_string = '-t <release>'
|
2015-03-25 18:08:13 +01:00
|
|
|
#else
|
|
|
|
$rel_string = ''
|
|
|
|
|
|
|
|
#if you need to specify a version
|
2015-04-06 20:29:02 +02:00
|
|
|
$ensure = '<version>'
|
2015-03-25 18:08:13 +01:00
|
|
|
#else
|
|
|
|
$ensure = installed
|
|
|
|
|
|
|
|
#if overwrite existing cfg files
|
|
|
|
$config_files = '-o Dpkg::Options::="--force-confnew"'
|
|
|
|
#elsif force use of old files
|
|
|
|
$config_files = '-o Dpkg::Options::="--force-confold"'
|
|
|
|
#elsif update only unchanged files
|
|
|
|
$config_files = '-o Dpkg::Options::="--force-confdef"'
|
|
|
|
#else
|
|
|
|
$config_files = ''
|
|
|
|
|
|
|
|
#if install missing configuration files for the package
|
|
|
|
$config_missing = '-o Dpkg::Options::="--force-confmiss"'
|
|
|
|
#else
|
|
|
|
$config_missing = ''
|
|
|
|
|
2015-04-06 22:18:58 +02:00
|
|
|
package { '<package>':
|
2015-03-25 18:08:13 +01:00
|
|
|
ensure => $ensure,
|
2015-04-06 20:29:02 +02:00
|
|
|
install_options => "${config_files} ${config_missing} ${rel_string}",
|
2015-03-25 18:08:13 +01:00
|
|
|
}
|