On Mon, Sep 13, 2010 at 5:41 PM, Luc Suryo <[email protected]> wrote:
> I been Google-ing and read docs for couple hours and can not see what
> I do wrong... can someone help?
>
Yes, except the code you copied and pasted doesn't match the error message
since it should of thrown a cannot find class error among several other
issues, so I'm not sure how it even got to the error message in your email.
class our-nagiios::client {
class our-nagios::client
define my_nagios_plugins ( $name ) {
>
You don't need to pass $name as a variable, $name = the title/namevar of the
resource, and $name is only in scope between { }. Puppet should throw an
exception here as well. It should simply be:
define my_nagios_plugins() {
> file { "$name" :
> name => "$nagios_plugins_dir/$name",
>
did you mean path => "${nagios_plugins_dir}/${name}" instead of name => ...
?
> source => "puppet:///nagios/etc/nagios/bin/
> $name",
> mode => 0555, owner => bin, group => bin,
> replace => true,
> ensure => file,
> after => File [ "$nagios_plugins_dir" ],
>
Do you mean require => File["$nagios_plugins_dir"] ? File dependency is
implicit, so puppet knows to require a parent directory before the file, so
it's not necessary.
Thanks,
Nan
--
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.