aboutsummaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-10-06 11:16:44 +0200
committerintrigeri <intrigeri@boum.org>2010-10-06 11:16:44 +0200
commitd65e1573a9f421d562eef6a11cbde99700036011 (patch)
treee184345582f0c5f37ba47508aad5f31791e4d827 /lib/puppet
parent356ff9334078198fde39fe5c8e8212109d6537a0 (diff)
downloadpuppet-apt-d65e1573a9f421d562eef6a11cbde99700036011.tar.gz
puppet-apt-d65e1573a9f421d562eef6a11cbde99700036011.tar.bz2
Add a few useful functions.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/nextcodename.rb10
-rw-r--r--lib/puppet/parser/functions/nextrelease.rb10
-rw-r--r--lib/puppet/parser/functions/release.rb11
3 files changed, 31 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/nextcodename.rb b/lib/puppet/parser/functions/nextcodename.rb
new file mode 100644
index 0000000..3dd592b
--- /dev/null
+++ b/lib/puppet/parser/functions/nextcodename.rb
@@ -0,0 +1,10 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_nextcodename, :type => :rvalue) do |args|
+ case #{args[0]} {
+ etch: { 'lenny' }
+ lenny: { 'squeeze' }
+ squeeze: { 'sid' }
+ sid: { 'experimental' }
+ }
+ end
+end
diff --git a/lib/puppet/parser/functions/nextrelease.rb b/lib/puppet/parser/functions/nextrelease.rb
new file mode 100644
index 0000000..4449121
--- /dev/null
+++ b/lib/puppet/parser/functions/nextrelease.rb
@@ -0,0 +1,10 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_nextrelease, :type => :rvalue) do |args|
+ case #{args[0]} {
+ oldstable: { 'stable' }
+ stable: { 'testing' }
+ testing: { 'unstable' }
+ unstable: { 'experimental' }
+ }
+ end
+end
diff --git a/lib/puppet/parser/functions/release.rb b/lib/puppet/parser/functions/release.rb
new file mode 100644
index 0000000..ef30484
--- /dev/null
+++ b/lib/puppet/parser/functions/release.rb
@@ -0,0 +1,11 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_release, :type => :rvalue) do |args|
+ case #{args[0]} {
+ etch: { 'oldstable' }
+ lenny: { 'stable' }
+ squeeze: { 'testing' }
+ sid: { 'unstable' }
+ experimental: { 'experimental' }
+ }
+ end
+end