Okay, I am having a bit of trouble figuring out the logic on this one. The following node set up works: ------------------------------------------------ node base{ include base-repos include ssh-base include common-root include puppet } node ox inherits base{ include java } -------------------------------------------- Do to quirks in another node I need to change node base to a class base. I discovered that nodes can''t inherit class. Not a problem, and it is mentioned in the language tutorial so I tried this setup ----------------------------------- class default-includes{ include base-repos include ssh-base include common-root include puppet } node base{ include default-includes node ox inherits base{ include java } ------------------------------------- Which fails because it can''t find a resource Yumrepo defined in base-repos. So the question is can some one explain how or why puppet is handling these differently? Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Evan Hisey wrote:> Do to quirks in another node I need to change node base to a class > base. I discovered that nodes can''t inherit class. Not a problem, and > it is mentioned in the language tutorial so I tried this setupThis should work: class base { include base-repos include ssh-base include common-root include puppet } node ox { include base include java } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 6/26/2008 11:14 AM, Evan Hisey wrote:> -------------------------------------------- > Do to quirks in another node I need to change node base to a class > base. I discovered that nodes can''t inherit class. Not a problem, and > it is mentioned in the language tutorial so I tried this setup > ----------------------------------- > class default-includes{ > include base-repos > include ssh-base > include common-root > include puppet > } > > node base{ > include default-includes > > node ox inherits base{ > include java > } > -------------------------------------I''ve got a relatively deep inheritance structure running here. The abridged version is as follows, and it works for me. The inheritances are tied to classes, not to nodes. class cae-host { file { "/etc/default/puppet": source => "puppet:///files/apps/puppet/puppet"; "/etc/default/portmap": source => "puppet:///files/apps/portmap/portmap"; } # Things common to all managed hosts go here -- accurate time, # centralized logging, sshd enabled, and automatic update capability include timezone-central, ntp, ntpdate include sudo, openssh-server, syslog-ng include cron-apt # other includes and manifest definitions go below } class public-host inherits cae-host { # A public host needs: # - Full list of usernames and uids synced from the file server. # - Kerberos password authentication from Active Directory. # File definitions go here. Edited for space. include active-directory-member } class cluster-host inherits public-host { # A cluster host needs: # - rshd running for Fluent jobs. # - torque running for any submitted jobs. # - Disabled Kerberos password authentication. Users only get access # via qsub. (FIXME) include rsh-server # other includes go here. package { [ "rsh-client", "ansys11", "libg2c0", "libnuma1" ]: ensure => latest; [ "ansys10" ]: ensure => absent; } } class pe2650-host inherits cluster-host { include pgicdk include gaussian include openmpi include autodocksuite gangliaconfig::gangliaclient{ "pe2650": cluster => "CAE 24-7 Compute Nodes", mcast_ip => "239.2.11.73"; } } node ch226-1, ch226-2, ch226-3, ch226-4, ch226-5 { include pe2650-host } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, Jun 26, 2008 at 12:49 PM, Johnny Tan <linuxweb@gmail.com> wrote:> > Evan Hisey wrote: >> Do to quirks in another node I need to change node base to a class >> base. I discovered that nodes can''t inherit class. Not a problem, and >> it is mentioned in the language tutorial so I tried this setup > > This should work: > > class base { > include base-repos > include ssh-base > include common-root > include puppet > } > > node ox { > include base > include java > }I am sure this works as does the my first example, and I can change everything around in all teh other nodes to make things work. The question though is not waht will work, but why one does and the other does not.It is a question on implementation theory and not for a working solution. Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---