On Fri, Aug 21, 2009 at 12:05 AM, Matt <mattmora...@gmail.com> wrote:

>
> I guess another way would be for me to start building custom facters
> of what a node is and then deploy the right files depending on the
> facter result.



> Anyone done similar?  I always feel with puppet i'm missing something
> obvious :-)


I think thats exactly what external nodes is design for...

>
>
> 2009/8/20 Ohad Levy <ohadl...@gmail.com>:
> > if you have a complex variables setup, I really recommend to move away to
> > external nodes(http://reductivelabs.com/trac/puppet/wiki/ExternalNodes)
> or
> > extlookup(
> > http://nephilim.ml.org/~rip/puppet/extlookup.rb<http://nephilim.ml.org/%7Erip/puppet/extlookup.rb>
> )
> >
> > if you use external nodes, you could use an external source (e.g. a
> > database, or web service like GNI) to define your variables on a node
> level.
> >
> > my 0.01 cents
> > Ohad
> >
> > On Thu, Aug 20, 2009 at 9:34 PM, Matt <mattmora...@gmail.com> wrote:
> >>
> >> I saw that but I think that did something else.
> >>
> >> node "mynode" {
> >>  include myclass, foo
> >> }
> >>
> >> node "mynode2" {
> >>  include foo
> >> }
> >>
> >> class "foo" {
> >>  if defined(Class['myclass']) {myvar = "hello"})
> >> }
> >>
> >> Will both mynode2 and mynode get the variable myvar?  In my case I
> >> only want mynode too.  If both do, then I guess I need to use tagged
> >> as Larry said, but make sure that myclass is first in the include?
> >>
> >> Thanks,
> >>
> >> Matt
> >>
> >> 2009/8/20 James Turnbull <ja...@lovedthanlost.net>:
> >> > Matt wrote:
> >> >> I looked at the language tutorial but couldn't see it anywhere.
> >> >>
> >> >
> >> > You might be looking for the defined function.
> >> >
> >> > http://reductivelabs.com/trac/puppet/wiki/FunctionReference#defined
> >> >
> >> > Regards
> >> >
> >> > James Turnbull
> >> >
> >> > --
> >> > Author of:
> >> > * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
> >> > * Pulling Strings with Puppet (http://tinyurl.com/pupbook)
> >> > * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> >> > * Hardening Linux (http://tinyurl.com/hardeninglinux)
> >> >
> >> >
> >>
> >>
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to