Reputation: 1389
I am trying to puppet locally in my mac(OS X). I installed latest versions of puppet, hiera and facter. I created a module with the following structure
$ find .
.
./files
./manifests
./manifests/init.pp
./templates
and contents of hello_world/manifests/init.pp
$ cat manifests/init.pp
class hello_world {
file {'/tmp/itworks':
ensure => directory,
}
}
but nothing happens when I run
puppet apply hello_world/manifests/init.pp
Upvotes: 1
Views: 2841
Reputation:
You can try :
puppet apply -e 'include hello_world'
or for a dry run
puppet apply -e 'include hello_world' --noop
For more puppet apply, see manual page : http://docs.puppetlabs.com/man/apply.html
Upvotes: 0
Reputation: 8223
You define a class but never include
it. (The class does not get declared.)
Note that modules are not usually applied directly. Instead, you apply a manifest that include
s a class from the module (often, the class that is named after the module and automagically located in module_name/manifests/init.pp
. E.g.
puppet apply -e 'include hello_world'
Note that the hello_world/
directory must be located in your $modulepath
(usually /etc/puppet/modules
for the open source variant.
Upvotes: 1