I created a module named as bharath as below..
$ pwd
>> /etc/puppetlabs/puppet/modules
$ ls -lrth
>> total 8.0K
>> drwxr-xr-x 6 root root 4.0K Apr 18 08:01 motd
>> drwxr-xr-x 6 root root 4.0K Apr 18 13:09 bharath
$ cd bharath/
$ ls -lrt
>> total 16
>> drwxr-xr-x 2 root root 4096 Apr 18 12:59 templates
>> drwxr-xr-x 2 root root 4096 Apr 18 13:10 files
>> drwxr-xr-x 2 root root 4096 Apr 18 13:15 manifests
>> drwxr-xr-x 2 root root 4096 Apr 18 13:16 tests h
$ cat manifests/init.pp files/india1 tests/init.pp
class india {
file { '/root/india1':
ensure => 'file',
source => 'puppet:///modules/bharath/india1',
}
}
india is grat country --> files/india1 content
include india --> tests/init.pp content
But still i am getting error as below..eventhough i added class india in stie.pp node classification directive as well.
$ cd tests
$ puppet apply --noop init.pp
>> Error: Could not find class india for uppetmaster.bharathkumarraju.com on node uppetmaster.bharathkumarraju.com
>> Error: Could not find class india for uppetmaster.bharathkumarraju.com on node puppetmaster.bharathkumarraju.com
When using puppet apply
you need to set your modulepath
on the command line.
$ puppet apply --modulepath /path/to/modules --noop init.pp
As @FelixFrank stated, you should reformat your question to make it more clear what you are asking, as well as better read the files you are cat
'ing.
Hope this helps