blob: 40e48083c31a9783f6b270da2ed08261bbb090be (
plain)
1
2
3
4
5
6
7
8
9
|
module Oxidized::Config::Vars
# convenience method for accessing node, group or global level user variables
# nil values will be ignored
def vars name
r = @node.vars[name] unless @node.vars.nil?
r ||= Oxidized::CFG.groups[@node.group].vars[name.to_s] if Oxidized::CFG.groups.has_key?(@node.group)
r ||= Oxidized::CFG.vars[name.to_s] if Oxidized::CFG.vars.has_key?(name)
end
end
|