Hi
On 05 Mar 2016, at 11:18, dE <de.tec...@gmail.com> wrote:

> Hi.
> 
> I've made a class in the $basemodulepath location --
> 
> puppet config print  | grep basemodulepath
> basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
> 
> ls -R /etc/puppetlabs/code/modules/all_class/
> /etc/puppetlabs/code/modules/all_class/:
> manifests

This means you have a module with name all_class.
> 
> /etc/puppetlabs/code/modules/all_class/manifests:
> dep.pp  first_class.pp

And there are two classes inside the module.
> 
> Contents of first_class.pp -- 
> class first_class {

The class is within the module namespace.
rename it to
class all_class::first_class {

>         file { '/tmp/fclass.txt':
>                 ensure => present,
>                 owner => de,
>                 group => de,
>         }
>         file { '/tmp/procs':
>                 ensure => directory,
>                 source => ['puppet:///modules/filesmmodule/proc_files/'],
>                 owner => de, 
>                 group => root,
>                 mode => '700',
>                 recurse => true
>         }
>         file {'/tmp/procs/cpuinfo':
>                 ensure => present,
>                 owner => de,
>                 group => de,
>         }
>         require Class["dep"]
> }
> 
> Contents of dep.pp —

Same here:
rename to
class all_class::dep {

> class dep {
>         file { '/tmp/dep_file':  
>                 ensure => present,
>                 owner => de
>         }
> }
> 
> When I call the class from the main manifest -- 
> 
> Error: Evaluation Error: Error while evaluating a Resource Statement, Could 
> not find declared class first_class at 
> /etc/puppetlabs/code/environments/production/manifests/default.pp:1:1 on node 
> desktop miner

I suppose you have something like include first_class in your manifest.
Puppet searches for
$basemodulepath/first_class/manifests/init.pp

> 
> It does not help if I define the class in $modulepath
> 
> Thanks for any help.
> 
> -- 
> 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/b0c4b1d7-7972-4a8e-aa71-ac2930a29513%40googlegroups.com.
> For more options, visit 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/F67B162B-E2AB-4193-9E42-6F55FF23E2EA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to