Although it is not incorrect, you should not bypass class boundaries, so it's better:
require=>Class['munin::install']
And usually you may include the diferent classes for a module in init.pp chaining them there.
Regards,
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOZy0enEGm-W1qtaCZfJ7J-6ovMs-uD2oN8fhX-KtGfmTaO%2BKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Although it is not incorrect, you should not bypass class boundaries, so it's better:
require=>Class['munin::install']
And usually you may include the diferent classes for a module in init.pp chaining them there.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9c5391f9-cca5-4b7c-b33f-f3cb488e305a%40googlegroups.com.
On Tuesday, March 4, 2014 1:30:44 AM UTC-6, Jose Luis Ledesma wrote:Although it is not incorrect, you should not bypass class boundaries, so it's better:
require=>Class['munin::install']
Well, that's one school of thought. Personally, I don't have any problem with cross-class relationships within the same module, as the OP's appears to be. In fact, I'd be willing to accept any cross-class relationship at all, provided that the class and module of the relationship target document the target as being declared by the module and available for such use. (But no one does that.)
And usually you may include the diferent classes for a module in init.pp chaining them there.
Yes, that's a common approach, though one should be clear that it's not simply init.pp where the class and relationship declarations reside in that case. Rather, such declarations would go in a module main class (in this case, Class['munin']) within init.pp. Also, that class needs to be declared in that case. Its mere existence is not sufficient.
Anyway, there should be no declarations in any init.pp but outside any class, definition, or node block. In fact, that applies to almost every manifest anywhere in your manifest set.
John
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9c5391f9-cca5-4b7c-b33f-f3cb488e305a%40googlegroups.com.
On Tue, Mar 4, 2014 at 3:36 PM, jcbollinger <John.Bo...@stjude.org> wrote:
On Tuesday, March 4, 2014 1:30:44 AM UTC-6, Jose Luis Ledesma wrote:Although it is not incorrect, you should not bypass class boundaries, so it's better:
require=>Class['munin::install']
Well, that's one school of thought. Personally, I don't have any problem with cross-class relationships within the same module, as the OP's appears to be. In fact, I'd be willing to accept any cross-class relationship at all, provided that the class and module of the relationship target document the target as being declared by the module and available for such use. (But no one does that.)
Perhaps it is, but I found it very useful when in the install class you have to install more than one package, if you set up the require against the install Class you don't have to care anymore about it.
Well, it is not an unbreakable rule, but from my point referencing individual resources from another class is a source of possible future problems.
In a simple module like the OP seems to expose, that is:
Params
Config
Install
Service
If you reference individual resources from another class will probably mean:
1. Make it difficult to read/understand for other people
2. Implenting this module for another Linux flavour will be harder (package/service name changes and so on)
3. Modifying it to add some other package/service/configuration will be harder too.
Point 2 and 3 also means possible undesired behaviors.
Just my point of view...
P.n. it is really a pleasure read all of your posts
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/63418eee-604c-468c-a680-65138be280a4%40googlegroups.com.