Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Luke Bigum
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

Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Douglas Garstang
On Fri, Jun 3, 2011 at 12:52 AM, Luke Bigum luke.bi...@lmax.com wrote: Douglas, If you don't use a conditional somewhere, how are you going to decide what resources are declared on what clients? I never said I didn't want to use conditionals somewhere. In that blog example, the classes

RE: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Russell Howe
-Original Message- From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Douglas Garstang Sent: 03 June 2011 16:21 To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] Re: Resources existing in different operating systems. All I

Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Douglas Garstang
Users] Re: Resources existing in different operating systems. All I was asking for was a way to conditional manage a resource based on the operating system. Something like: file { $operatingsystem ? { 'centos' = { /etc/somefile: source = }, 'default

Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Luke Bigum
On 03/06/11 16:21, Douglas Garstang wrote: I'd also like to see something, maybe in the best practices document on the Puppet Labs website indicating which is the correct way to handle specific operating ystem logic. Having multiple classes (ie a lot of classes) per module, means more files,

Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Pietro Monteiro
On 06/03/2011 10:04 AM, Douglas Garstang wrote: What if the file doesn't exist at all on the other distro? I know for example that centos creates a symlink from /boot/grub/grub.conf to /etc/grub.conf. What if I only wanted to manage this file for CentOS, and for other distro's, do nothing ?

RE: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Russell Howe
What if the file doesn't exist at all on the other distro? I know for example that centos creates a symlink from /boot/grub/grub.conf to /etc/grub.conf. What if I only wanted to manage this file for CentOS, and for other distro's, do nothing ? Put the file resource inside the case

Re: [Puppet Users] Re: Resources existing in different operating systems.

2011-06-03 Thread Dominic Cleal
Great to see this discussed, thanks for bringing it up. (Disclaimer: I'm the author of the blog post) On 03/06/11 18:05, Luke Bigum wrote: On 03/06/11 16:21, Douglas Garstang wrote: I'd also like to see something, maybe in the best practices document on the Puppet Labs website indicating

[Puppet Users] Re: Resources existing in different operating systems.

2011-06-02 Thread Douglas Garstang
On Thu, Jun 2, 2011 at 12:36 PM, Douglas Garstang doug.garst...@gmail.comwrote: 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