projects
/
mirror
/
dsa-puppet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add ability to extract keys from nodeinfo
[mirror/dsa-puppet.git]
/
files
/
etc
/
puppet
/
lib
/
puppet
/
parser
/
functions
/
extractnodeinfo.rb
1
module Puppet::Parser::Functions
2
newfunction(:extractnodeinfo, :type => :rvalue) do |args|
3
4
nodeinfo = args[0]
5
key = args[1]
6
7
if nodeinfo.has_key?(key)
8
return nodeinfo[key]
9
else
10
return "false"
11
end
12
end
13
end