Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
(GH-1038) add support for `check-valid-until` configuration
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
params.pp
diff --git
a/manifests/params.pp
b/manifests/params.pp
index c648c4ef992b853cacc0dea271a2ae0c4d21e207..5ef175b713d46b5f7caca0e9102b8aa0958160a4 100644
(file)
--- a/
manifests/params.pp
+++ b/
manifests/params.pp
@@
-1,11
+1,10
@@
# @summary Provides defaults for the Apt module parameters.
# @summary Provides defaults for the Apt module parameters.
-#
+#
# @api private
#
class apt::params {
# @api private
#
class apt::params {
-
- if $::osfamily != 'Debian' {
- fail(translate('This module only works on Debian or derivatives like Ubuntu'))
+ if $facts['os']['family'] != 'Debian' {
+ fail('This module only works on Debian or derivatives like Ubuntu')
}
$root = '/etc/apt'
}
$root = '/etc/apt'
@@
-44,7
+43,7
@@
class apt::params {
'list' => {
'path' => $sources_list_d,
'ext' => '.list',
'list' => {
'path' => $sources_list_d,
'ext' => '.list',
- }
+ }
,
}
$update_defaults = {
}
$update_defaults = {
@@
-71,19
+70,12
@@
class apt::params {
'apt.conf.d' => false,
}
'apt.conf.d' => false,
}
- $source_key_defaults = {
- 'server' => $keyserver,
- 'options' => undef,
- 'content' => undef,
- 'source' => undef,
- }
-
$include_defaults = {
'deb' => true,
'src' => false,
}
$include_defaults = {
'deb' => true,
'src' => false,
}
- case $facts['os']['name']{
+ case $facts['os']['name']
{
'Debian': {
$backports = {
'location' => 'http://deb.debian.org/debian',
'Debian': {
$backports = {
'location' => 'http://deb.debian.org/debian',
@@
-91,11
+83,7
@@
class apt::params {
}
$ppa_options = undef
$ppa_package = undef
}
$ppa_options = undef
$ppa_package = undef
- if versioncmp($facts['os']['release']['major'], '9') >= 0 {
- $auth_conf_owner = '_apt'
- } else {
- $auth_conf_owner = 'root'
- }
+ $auth_conf_owner = '_apt'
}
'Ubuntu': {
$backports = {
}
'Ubuntu': {
$backports = {
@@
-105,14
+93,10
@@
class apt::params {
}
$ppa_options = '-y'
$ppa_package = 'software-properties-common'
}
$ppa_options = '-y'
$ppa_package = 'software-properties-common'
- if versioncmp($facts['os']['release']['full'], '16.04') >= 0 {
- $auth_conf_owner = '_apt'
- } else {
- $auth_conf_owner = 'root'
- }
+ $auth_conf_owner = '_apt'
}
undef: {
}
undef: {
- fail(
translate('Unable to determine value for fact os[\"name\"]')
)
+ fail(
'Unable to determine value for fact os[\"name\"]'
)
}
default: {
$ppa_options = undef
}
default: {
$ppa_options = undef