On Dec 13, 2007 5:15 AM, Joshua Timberman <joshua.timberman@gmail.com>
wrote:> I asked on IRC but no one responded.
>
> Suppose the following:
>
> class basenode {
> include users
> include security
> class webserver {
> include apache, php
> }
> }
>
> node web1a {
> include basenode::webserver
> }
>
> Does node web1a imply including users and security specified under
> class basenode as well?
No, you''d have to add an "inherits basenode" to the class
line for
webserver, like:
..
class webserver inherits basenode {
..
> Similarly, does this mean the same thing?
>
> class basenode {
> include users
> include security
> }
> class basenode::webserver {
> include apache, php
> }
>
That is equivalent to the first, yes.
> Will the same node web1a block get all four classes, users, security,
> apache and php? Or do I need to say:
>
> class basenode {
> class webserver inherits basenode { }
> }
> or
> class basenode { }
> class webserver inherits basenode { }
>
> I''m trying to follow the new shift for node templates to nodes
> including the ''base'' class and other classes, rather than
''node web1a
> inherits webserver which inherits basenode''.
Yes, you need to do either of the above to get all classes in node
web1a. How you do it depends on what you want.
I''d use the second in this case, as I think you would call a node a
''webserver'', and not a
''basenode::webserver''.
Thijs
> _______________________________________________
> Puppet-users mailing list
> Puppet-users@madstop.com
> https://mail.madstop.com/mailman/listinfo/puppet-users
>