FAQ
I've been reading the Docs on this, and its not very clear.

I want to have a parameterized class that takes arrays and objects as
parameters.
I'm using puppet 2.6.16.

I define a hostclass like this:

hostclass :test, :arguments => { :param1 => "blah" } do

end

I call from Puppet DSL:

class {"test":

}

I get this as an error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Puppet::Parser::AST::Resource failed with error NoMethodError: undefined
method `safeevaluate' for "blah":String at
/data/puppet/nbenns/modules/atg/manifests/init.pp:56 on node <removed>

If I add the parameter in its fine.

If :arguments => { :param1 => "blah" } isn't used as :arguments => {
paramname => default value }
then what is it?
the documentation isn't clear at all on this.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/f4AQx0T8Wv4J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Llowder at Jul 5, 2012 at 9:30 pm
    Comments inline.
    On Thursday, July 5, 2012 2:31:47 PM UTC-5, polaris_s0i wrote:

    I've been reading the Docs on this, and its not very clear.

    I want to have a parameterized class that takes arrays and objects as
    parameters.
    I'm using puppet 2.6.16.

    I define a hostclass like this:

    hostclass :test, :arguments => { :param1 => "blah" } do

    end

    I call from Puppet DSL:
    Try using it in the other way:

    include test

    rather than in the parametrized way.

    class {"test":

    }

    I get this as an error:

    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Puppet::Parser::AST::Resource failed with error NoMethodError: undefined
    method `safeevaluate' for "blah":String at
    /data/puppet/nbenns/modules/atg/manifests/init.pp:56 on node <removed>

    If I add the parameter in its fine.

    If :arguments => { :param1 => "blah" } isn't used as :arguments => {
    paramname => default value }
    then what is it?
    the documentation isn't clear at all on this.

    Thanks.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CPQDyooO848J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 5, '12 at 7:36p
activeJul 5, '12 at 9:30p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Llowder: 1 post Polaris_s0i: 1 post

People

Translate

site design / logo © 2022 Grokbase