On 09/05/2012 08:07 PM, Jakov Sosic wrote:
> newparam(:destdir) do
> desc "The link of the distro ISO image."
> validate do |value|
> unless Pathname.new(value).absolute?
> raise ArgumentError, "Full pathname must be set"
> end
> end
> end
> cobblerdistro {'CentOS-6.3-x86_64':
> ensure => absent,
> destdir => '/distro',
> }
Maybe I didn't make my self clear enough.... On a puppet run, if the
resource doesn't have destdir defined, i get this error:
err:
/Stage[main]//Node[sunce.srce.hr]/Cobbler::Add_distro[CentOS-6.3-x86_64]/Cobblerdistro[CentOS-6.3-x86_64]:
Could not evaluate: undefined method `+' for nil:NilClass
I would like to inform user what the problem is rather then print out
some obscure message like this one.
So, how can I do this from type definition ruby code? Thank you.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.