Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of $::apt::params::backports and $::apt::params::xfacts. #542

Merged
merged 1 commit into from
Jun 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions manifests/backports.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$repos = undef,
$key = undef,
$pin = 200,
){
) inherits apt::params {
if $location {
validate_string($location)
$_location = $location
Expand All @@ -29,18 +29,18 @@
}
}

if ($::apt::xfacts['lsbdistid'] == 'debian' or $::apt::xfacts['lsbdistid'] == 'ubuntu') {
if ($::apt::params::xfacts['lsbdistid'] == 'debian' or $::apt::params::xfacts['lsbdistid'] == 'ubuntu') {
unless $location {
$_location = $::apt::backports['location']
$_location = $::apt::params::backports['location']
}
unless $release {
$_release = "${::apt::xfacts['lsbdistcodename']}-backports"
$_release = "${::apt::params::xfacts['lsbdistcodename']}-backports"
}
unless $repos {
$_repos = $::apt::backports['repos']
$_repos = $::apt::params::backports['repos']
}
unless $key {
$_key = $::apt::backports['key']
$_key = $::apt::params::backports['key']
}
} else {
unless $location and $release and $repos and $key {
Expand Down
6 changes: 4 additions & 2 deletions manifests/ppa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
define apt::ppa(
$ensure = 'present',
$options = $::apt::ppa_options,
$release = $::apt::xfacts['lsbdistcodename'],
$release = $::apt::params::xfacts['lsbdistcodename'],
$package_name = $::apt::ppa_package,
$package_manage = false,
) {
include 'apt::params'

unless $release {
fail('lsbdistcodename fact not available: release parameter required')
}

if $::apt::xfacts['lsbdistid'] == 'Debian' {
if $::apt::params::xfacts['lsbdistid'] == 'Debian' {
fail('apt::ppa is not currently supported on Debian.')
}

Expand Down