Douglas,

If you don't use a conditional somewhere, how are you going to decide what resources are declared on what clients?

In that blog example, the classes are loaded based on the value of a fact reported by the Puppet client, in some ways "more reliable" than a variable defined in a Puppet master manifest. It's also not that bad a practice to conditionally include on variables declared at the top level (node.pp) - avoids variable scoping issues, a number of people on the list do that.

Using sub classes based on operating system also gives you the added advantage of tracking down problems sooner, a Puppet error will look like:

Foo::Redhat::File["foo.conf"] ...

What approach would you like to see, conceptually? Maybe someone's done something similar with an ENC.

-Luke

On 03/06/11 05:25, Douglas Garstang wrote:
On Thu, Jun 2, 2011 at 12:36 PM, Douglas Garstang <doug.garst...@gmail.com <mailto:doug.garst...@gmail.com>> wrote:

    So... I'm thinking about how to have puppet manage different
    operating systems. It's one thing to use a selector to determine
    the value of specific resources attribute, but what do you do when
    a file may not exist on a specific O/S? You can't use a selector
    in this case.

    I really don't like the approach described here either...

    http://m0dlx.com/blog/Puppet_manifests__a_multi_OS_style_guide.html

    ...where classes are loaded dynamically based on the value of a
    variable.

    What would best practice indicate?

    Doug.


*jabs anyone that's prepared to be jabbed*



--
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.


--
Luke Bigum

Information Systems
luke.bi...@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN



The information in this e-mail and any attachment is confidential and is 
intended only for the named recipient(s). The e-mail may not be disclosed or 
used by any person other than the addressee, nor may it be copied in any way. 
If you are not a named recipient please notify the sender immediately and 
delete any copies of this message. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden. Any view or 
opinions presented are solely those of the author and do not necessarily 
represent those of the company.

--
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