7 ) inherits apt::params {
9 validate_string($location)
10 $_location = $location
13 validate_string($release)
17 validate_string($repos)
21 unless is_hash($key) {
26 unless is_hash($pin) {
27 unless (is_numeric($pin) or is_string($pin)) {
28 fail('pin must be either a string, number or hash')
32 if ($::apt::params::xfacts['lsbdistid'] == 'debian' or $::apt::params::xfacts['lsbdistid'] == 'ubuntu') {
34 $_location = $::apt::params::backports['location']
37 $_release = "${::apt::params::xfacts['lsbdistcodename']}-backports"
40 $_repos = $::apt::params::backports['repos']
43 $_key = $::apt::params::backports['key']
46 unless $location and $release and $repos and $key {
47 fail('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')
51 apt::source { 'backports':
52 location => $_location,