aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-05-20 18:08:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-05-20 18:08:15 -0300
commit7c548c9878a5e0cecca771a6b7a739af98c21f4e (patch)
tree03608d69b10bd1d8c35b648edc6da0b546726768
parentee15eb570d941ac4113bfad37a539a7e3636f8d2 (diff)
parentc38be6cb7c2cbd53a133291b2750d053877ebe4f (diff)
downloadpuppet-apt-7c548c9878a5e0cecca771a6b7a739af98c21f4e.tar.gz
puppet-apt-7c548c9878a5e0cecca771a6b7a739af98c21f4e.tar.bz2
Merge branch 'master' of ssh://labs.riseup.net/shared-apt
Conflicts: manifests/init.pp
-rw-r--r--lib/puppet/parser/functions/debian_nextcodename.rb3
-rw-r--r--lib/puppet/parser/functions/debian_release.rb6
-rw-r--r--lib/puppet/parser/functions/debian_release_version.rb1
-rw-r--r--manifests/init.pp27
-rw-r--r--manifests/params.pp17
5 files changed, 36 insertions, 18 deletions
diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb
index f57dd2a..3d5c3bd 100644
--- a/lib/puppet/parser/functions/debian_nextcodename.rb
+++ b/lib/puppet/parser/functions/debian_nextcodename.rb
@@ -4,7 +4,8 @@ module Puppet::Parser::Functions
when "etch" then "lenny"
when "lenny" then "squeeze"
when "squeeze" then "wheezy"
- when "wheezy" then "sid"
+ when "wheezy" then "jessie"
+ when "jessie" then "sid"
when "sid" then "experimental"
else "sid"
end
diff --git a/lib/puppet/parser/functions/debian_release.rb b/lib/puppet/parser/functions/debian_release.rb
index 857edf3..d7b6718 100644
--- a/lib/puppet/parser/functions/debian_release.rb
+++ b/lib/puppet/parser/functions/debian_release.rb
@@ -1,9 +1,9 @@
module Puppet::Parser::Functions
newfunction(:debian_release, :type => :rvalue) do |args|
case args[0]
- when 'lenny' then 'oldstable'
- when 'squeeze' then 'stable'
- when 'wheezy' then 'testing'
+ when 'squeeze' then 'oldstable'
+ when 'wheezy' then 'stable'
+ when 'jessie' then 'testing'
when 'sid' then 'unstable'
when 'experimental' then 'experimental'
else 'testing'
diff --git a/lib/puppet/parser/functions/debian_release_version.rb b/lib/puppet/parser/functions/debian_release_version.rb
index ff58f72..0abe90e 100644
--- a/lib/puppet/parser/functions/debian_release_version.rb
+++ b/lib/puppet/parser/functions/debian_release_version.rb
@@ -4,6 +4,7 @@ module Puppet::Parser::Functions
when 'etch' then '4.0'
when 'lenny' then '5.0'
when 'squeeze' then '6.0'
+ when 'wheezy' then '7.0'
else ''
end
end
diff --git a/manifests/init.pp b/manifests/init.pp
index 17d87c7..c5afb2b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -4,20 +4,19 @@
# See LICENSE for the full license granted to you.
class apt(
- $codename = $::lsbdistcodename,
- $use_volatile = false,
- $include_src = false,
- $use_next_release = false,
- $debian_url = 'http://http.debian.net/debian/',
- $security_url = 'http://security.debian.org/',
- $backports_url = 'http://backports.debian.org/debian-backports/',
- $volatile_url = 'http://volatile.debian.org/debian-volatile/',
- $ubuntu_url = 'http://archive.ubuntu.com/ubuntu',
- $repos = 'auto',
- $custom_preferences = '',
- $disable_update = false,
- $custom_key_dir = false
-){
+ $codename = $apt::params::codename,
+ $use_volatile = $apt::params::use_volatile,
+ $include_src = $apt::params::include_src,
+ $use_next_release = $apt::params::use_next_release,
+ $debian_url = $apt::params::debian_url,
+ $security_url = $apt::params::security_url,
+ $backports_url = $apt::params::backports_url,
+ $volatile_url = $apt::params::volatile_url,
+ $ubuntu_url = $apt::params::ubuntu_url,
+ $repos = $apt::params::repos,
+ $custom_preferences = $apt::params::custom_preferences,
+ $disable_update = $apt::params::disable_update
+) inherits apt::params {
case $::operatingsystem {
'debian': {
$real_repos = $repos ? {
diff --git a/manifests/params.pp b/manifests/params.pp
new file mode 100644
index 0000000..b210ff6
--- /dev/null
+++ b/manifests/params.pp
@@ -0,0 +1,17 @@
+class apt::params () {
+ $codename = $::lsbdistcodename
+ $use_volatile = false
+ $include_src = false
+ $use_next_release = false
+ $debian_url = 'http://http.debian.net/debian/'
+ $security_url = 'http://security.debian.org/'
+ $backports_url = $::lsbdistcodename ? {
+ 'wheezy' => $debian_url,
+ default => 'http://backports.debian.org/debian-backports/',
+ }
+ $volatile_url = 'http://volatile.debian.org/debian-volatile/'
+ $ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
+ $repos = 'auto'
+ $custom_preferences = ''
+ $disable_update = false
+}