Merge pull request #493 from mhaskel/remove_mint
Remove default support for Linux Mint and Cumulus Networks
This commit is contained in:
commit
02e1e05ace
4 changed files with 9 additions and 50 deletions
|
@ -88,39 +88,8 @@ class apt::params {
|
||||||
}
|
}
|
||||||
|
|
||||||
case $xfacts['lsbdistid'] {
|
case $xfacts['lsbdistid'] {
|
||||||
'ubuntu', 'debian': {
|
|
||||||
$distid = $xfacts['lsbdistid']
|
|
||||||
$distcodename = $xfacts['lsbdistcodename']
|
|
||||||
}
|
|
||||||
'linuxmint': {
|
|
||||||
if $xfacts['lsbdistcodename'] == 'debian' {
|
|
||||||
$distid = 'debian'
|
|
||||||
$distcodename = 'wheezy'
|
|
||||||
} else {
|
|
||||||
$distid = 'ubuntu'
|
|
||||||
$distcodename = $xfacts['lsbdistcodename'] ? {
|
|
||||||
'qiana' => 'trusty',
|
|
||||||
'petra' => 'saucy',
|
|
||||||
'olivia' => 'raring',
|
|
||||||
'nadia' => 'quantal',
|
|
||||||
'maya' => 'precise',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'Cumulus Networks': {
|
|
||||||
$distid = 'debian'
|
|
||||||
$distcodename = $::lsbdistcodename
|
|
||||||
}
|
|
||||||
undef: {
|
|
||||||
fail('Unable to determine lsbdistid, is lsb-release installed?')
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("Unsupported lsbdistid (${::lsbdistid})")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case $distid {
|
|
||||||
'debian': {
|
'debian': {
|
||||||
case $distcodename {
|
case $xfacts['lsbdistcodename'] {
|
||||||
'squeeze': {
|
'squeeze': {
|
||||||
$backports = {
|
$backports = {
|
||||||
'location' => 'http://backports.debian.org/debian-backports',
|
'location' => 'http://backports.debian.org/debian-backports',
|
||||||
|
@ -144,7 +113,7 @@ class apt::params {
|
||||||
'repos' => 'main universe multiverse restricted',
|
'repos' => 'main universe multiverse restricted',
|
||||||
}
|
}
|
||||||
|
|
||||||
case $distcodename {
|
case $xfacts['lsbdistcodename'] {
|
||||||
'lucid': {
|
'lucid': {
|
||||||
$ppa_options = undef
|
$ppa_options = undef
|
||||||
$ppa_package = 'python-software-properties'
|
$ppa_package = 'python-software-properties'
|
||||||
|
@ -163,7 +132,10 @@ class apt::params {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'', default: {
|
undef: {
|
||||||
|
fail('Unable to determine lsbdistid, is lsb-release installed?')
|
||||||
|
}
|
||||||
|
default: {
|
||||||
$ppa_options = undef
|
$ppa_options = undef
|
||||||
$ppa_package = undef
|
$ppa_package = undef
|
||||||
$backports = undef
|
$backports = undef
|
||||||
|
|
|
@ -10,8 +10,8 @@ define apt::ppa(
|
||||||
fail('lsbdistcodename fact not available: release parameter required')
|
fail('lsbdistcodename fact not available: release parameter required')
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::apt::distid != 'ubuntu' {
|
if $::apt::xfacts['lsbdistid'] == 'Debian' {
|
||||||
fail('apt::ppa is currently supported on Ubuntu and LinuxMint only.')
|
fail('apt::ppa is not currently supported on Debian.')
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename_without_slashes = regsubst($name, '/', '-', 'G')
|
$filename_without_slashes = regsubst($name, '/', '-', 'G')
|
||||||
|
|
|
@ -12,19 +12,6 @@ describe 'apt::params', :type => :class do
|
||||||
expect(subject.resources.size).to eq(4)
|
expect(subject.resources.size).to eq(4)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "With unknown lsbdistid" do
|
|
||||||
|
|
||||||
let(:facts) { { :lsbdistid => 'CentOS', :osfamily => 'Debian' } }
|
|
||||||
let (:title) { 'my_package' }
|
|
||||||
|
|
||||||
it do
|
|
||||||
expect {
|
|
||||||
is_expected.to compile
|
|
||||||
}.to raise_error(Puppet::Error, /Unsupported lsbdistid/)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "With lsb-release not installed" do
|
describe "With lsb-release not installed" do
|
||||||
let(:facts) { { :lsbdistid => '', :osfamily => 'Debian' } }
|
let(:facts) { { :lsbdistid => '', :osfamily => 'Debian' } }
|
||||||
let (:title) { 'my_package' }
|
let (:title) { 'my_package' }
|
||||||
|
|
|
@ -298,7 +298,7 @@ describe 'apt::ppa' do
|
||||||
it do
|
it do
|
||||||
expect {
|
expect {
|
||||||
is_expected.to compile
|
is_expected.to compile
|
||||||
}.to raise_error(Puppet::Error, /supported on Ubuntu and LinuxMint only/)
|
}.to raise_error(Puppet::Error, /not currently supported on Debian/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue