On Fri, Jan 09, 2015 at 01:51:28PM -0800, Drew wrote:
>    I'm fooling around with some defined types and am struggling a little.
>     The following is just a small example of what I'm doing while I work it
>    out:
>    #/etc/puppet/modules/testmodule/manifests/init.pp
>    define testmodule ( $message ){
>      testmodule::down { "${name}":
>         message => "test message for ${name}",
>      }
>    }

I think init.pp has to contain only the class with the same name as the module.

https://docs.puppetlabs.com/learning/modules1.html#module-structure
https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#example

You'd have to put the first define in another file is all.

>    #/etc/puppet/modules/testmodule/manifests/down.pp
>    define testmodule::down (
>      $message = "This is a test",
>    ){
>            notify { "$name":
>                    message => "$message"
>            }
>    }
>    And I'm calling it like:
>      testmodule { "$filename":
>        message => $message,
>      }

(You'll get other interesting errors if $filename is not defined anywhere.)

>    I have it included in my site.pp but I keep getting this:
>    Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
>    Could not find class testmodule for [1]puptest.domain.com on
>    node [2]puptest.domain.com
>    Warning: Not using cache on failed catalog
>    Error: Could not retrieve catalog; skipping run
>    Google provides no solutions to this that I've been able to discover thus
>    far.  Any help would be appreciated.  I'm sure it's some lack of
>    understanding on my part.
>    Thanks!
> 
>    --
>    You received this message because you are subscribed to the Google Groups
>    "Puppet Users" group.
>    To unsubscribe from this group and stop receiving emails from it, send an
>    email to [3]puppet-users+unsubscr...@googlegroups.com.
>    To view this discussion on the web visit
>    
> [4]https://groups.google.com/d/msgid/puppet-users/7b9505ce-1383-42ff-8f00-e28e86353000%40googlegroups.com.
>    For more options, visit [5]https://groups.google.com/d/optout.
> 
> References
> 
>    Visible links
>    1. http://puptest.ironmountain.com/
>    2. http://puptest.ironmountain.com/
>    3. mailto:puppet-users+unsubscr...@googlegroups.com
>    4. 
> https://groups.google.com/d/msgid/puppet-users/7b9505ce-1383-42ff-8f00-e28e86353000%40googlegroups.com?utm_medium=email&utm_source=footer
>    5. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20150110133900.GA32604%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to