Thanks Nigel! That works like a charm. But leaves me with one question
and another problem. First the question: If I always need to specify
the varable like "$zmfs::settings::l_dir", then waht the significance
of the "include" statement (e.g. include zmfs::settings ) in the
beginning of the manifest?

Now the problem is: If I define "env_check" inside a
'class' (envcheck.pp in my example code above) and specify "include
zmfs::envcheck" in the config.pp, I get this error:

-------------------------
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type line_check at /etc/puppet/modules/zmfs/manifests/
config.pp:94 on node farm002.. .. ..ac.uk
-------------------------

It only works if the envcheck.pp like this way:


------------------------
   # /modulepath/modules/zmfs/manifests/envcheck.pp:

    define env_check($file, $string, $swdir, $refreshonly = 'true') {
        ......
        ......
    }
------------------------

(i.e. without having a class) and use "import  envcheck.pp", instead
of: include zmfs::envcheck in the manifest. Does any one know what's
going wrong?

Cheers,
San


>
> You want to use $zmfs::settings::l_dir
>
> You're fully qualifying the variable, so you need the "full path" to it,
> including the name of the module it lives in.
>
> --
> Nigel Kersten
> Product Manager, Puppet Labs

-- 
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.

Reply via email to