I have written a module to setup a web server.I'm actually trying to apply multiple manifests.How can i use additional manifests in init.pp using the puppet apply command?
kp/manifests/init.pp:
class kp {
include kp::testfile
}
include kp
kp/manifests/testfile.pp (additional manifest)
define kp::testfile {
$value = template("kp/some.erb")
file { 'testfile':
path => '/tmp/my.txt',
ensure => file,
content => $value
}
}
As per the Documentation i have tried to define a class in the module and declared that class by name in my manifest but when I run puppet apply init.pp I am getting error message
Could not find class kp::testfile for myhost.com at /myDir/puppetModules/kp/manifests/init.pp:2 on node vagrant.example.com
/myDir/puppetModules/ is in modulepath but where am i going wrong?