]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Add a few useful functions.
authorintrigeri <intrigeri@boum.org>
Wed, 6 Oct 2010 09:16:44 +0000 (11:16 +0200)
committerintrigeri <intrigeri@boum.org>
Wed, 6 Oct 2010 09:16:44 +0000 (11:16 +0200)
lib/puppet/parser/functions/nextcodename.rb [new file with mode: 0644]
lib/puppet/parser/functions/nextrelease.rb [new file with mode: 0644]
lib/puppet/parser/functions/release.rb [new file with mode: 0644]

diff --git a/lib/puppet/parser/functions/nextcodename.rb b/lib/puppet/parser/functions/nextcodename.rb
new file mode 100644 (file)
index 0000000..3dd592b
--- /dev/null
@@ -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 (file)
index 0000000..4449121
--- /dev/null
@@ -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 (file)
index 0000000..ef30484
--- /dev/null
@@ -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