[TriLUG] n00b puppet question
Igor Partola
igor at igorpartola.com
Fri Oct 24 16:08:04 EDT 2014
Yes that should work. Basically, you'd have:
manifests/foo.pp
node foo {
class {'mymodule': }
}
modules/mymodule/manifests/init.pp
class mymodule {
# All the postgres stuff
}
I think you might be putting your code in modules/mymodule/init.pp but you
should do modules/mymodule/MANIFESTS/init.pp (lower case; I added upper
case just for emphasis).
Note that you can always run this puppet without puppet master. This is my
preferred method since dealing with the certs is a pain. Instead, I end up
creating a tar file with all the manifests, sftp-ing it to the server, then
running the manifests like this: `sudo puppet apply
--modulepath=puppet/modules puppet/manifests/foo.pp`. This way I don't have
to name hosts in manifests/foo.pp or manifests/bar.pp: they just end up
being "node default {...".
Igor
More information about the TriLUG
mailing list