On Tue, 2012-12-18 at 09:09 -0800, rsom@certifydatasystems.com wrote:
Hi all,
I want to do some code reuse, and modules seem overkill. Is it possible to
have something like this?
Hi all,
I want to do some code reuse, and modules seem overkill. Is it possible to
have something like this?
a bit. I'd really recommend using them over the 'import' suggestion.
A file called myuser.pp
class myuser {
user {...}
file {...}
...
}
Just move this file to /etc/puppet/modules/myuser/init.pp
Then in site.pp have this:
node 'foo.example.com' {
include myuser
.. other things ..
}
node 'bar.example.com' {
include myuser
.. other things ..
}
Then these 'include's will automatically find the fileclass myuser {
user {...}
file {...}
...
}
Just move this file to /etc/puppet/modules/myuser/init.pp
Then in site.pp have this:
node 'foo.example.com' {
include myuser
.. other things ..
}
node 'bar.example.com' {
include myuser
.. other things ..
}
modules/myuser/init.pp and load it for you. That's it!
--
Calvin Walton <calvin.walton@kepstin.ca>
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.