All,

Is it possible to use default values in a composite namevar?

I'm having a heck of a time making it work properly.

I tried:

def self.title_patterns
    [
      [
        /^(.*)$/,
       [
          [:path, lambda{|x| x }],
          [:function, lambda{|x| x }]
        ]
      ]
    ]
    end

newparam(:name) do
end

newparam(:path) do
  isnamevar
  defaultto('/some/random/path')
end

newparam(:function) do
  isnamevar
end

I'm having two issues with this. First, Puppet *really* wants :name to
be a namevar. I don't care what it is but if 'path' and 'function' are
the same in two resources, then the resource declaration should fail.
I don't mind making 'path' the 'name' equivalent, but Puppet treats
that as a duplicate resource no matter what I do.

The second issue is that the code simply won't recognize the default
value for :path and I don't want to have to type out the path every
time for the obvious reasons.

Puppet 2.7.17

Any help would be appreciated.

Thanks,

Trevor
-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to