From d65e1573a9f421d562eef6a11cbde99700036011 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 6 Oct 2010 11:16:44 +0200 Subject: Add a few useful functions. --- lib/puppet/parser/functions/nextcodename.rb | 10 ++++++++++ lib/puppet/parser/functions/nextrelease.rb | 10 ++++++++++ lib/puppet/parser/functions/release.rb | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 lib/puppet/parser/functions/nextcodename.rb create mode 100644 lib/puppet/parser/functions/nextrelease.rb create mode 100644 lib/puppet/parser/functions/release.rb (limited to 'lib/puppet/parser') 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 -- cgit v1.2.3