aboutsummaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/debian_nextcodename.rb12
-rw-r--r--lib/puppet/parser/functions/debian_nextrelease.rb11
-rw-r--r--lib/puppet/parser/functions/debian_release.rb12
-rw-r--r--lib/puppet/parser/functions/debian_release_version.rb10
4 files changed, 45 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb
new file mode 100644
index 0000000..f57dd2a
--- /dev/null
+++ b/lib/puppet/parser/functions/debian_nextcodename.rb
@@ -0,0 +1,12 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_nextcodename, :type => :rvalue) do |args|
+ case args[0]
+ when "etch" then "lenny"
+ when "lenny" then "squeeze"
+ when "squeeze" then "wheezy"
+ when "wheezy" then "sid"
+ when "sid" then "experimental"
+ else "sid"
+ end
+ end
+end
diff --git a/lib/puppet/parser/functions/debian_nextrelease.rb b/lib/puppet/parser/functions/debian_nextrelease.rb
new file mode 100644
index 0000000..76c3e0d
--- /dev/null
+++ b/lib/puppet/parser/functions/debian_nextrelease.rb
@@ -0,0 +1,11 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_nextrelease, :type => :rvalue) do |args|
+ case args[0]
+ when 'oldstable' then 'stable'
+ when 'stable' then 'testing'
+ when 'testing' then 'unstable'
+ when 'unstable' then 'experimental'
+ else 'unstable'
+ end
+ end
+end
diff --git a/lib/puppet/parser/functions/debian_release.rb b/lib/puppet/parser/functions/debian_release.rb
new file mode 100644
index 0000000..857edf3
--- /dev/null
+++ b/lib/puppet/parser/functions/debian_release.rb
@@ -0,0 +1,12 @@
+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 'sid' then 'unstable'
+ when 'experimental' then 'experimental'
+ else 'testing'
+ end
+ end
+end
diff --git a/lib/puppet/parser/functions/debian_release_version.rb b/lib/puppet/parser/functions/debian_release_version.rb
new file mode 100644
index 0000000..ff58f72
--- /dev/null
+++ b/lib/puppet/parser/functions/debian_release_version.rb
@@ -0,0 +1,10 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_release_version, :type => :rvalue) do |args|
+ case args[0]
+ when 'etch' then '4.0'
+ when 'lenny' then '5.0'
+ when 'squeeze' then '6.0'
+ else ''
+ end
+ end
+end