[Puppet Users] Re: Pattern matching in case statement

2009-01-21 Thread Jeffrey Hulten
> > Sven > > -Original Message- > From: puppet-users@googlegroups.com [mailto:puppet-us...@googlegroups.com] On > Behalf Of Jeff Leggett > Sent: Tuesday, January 20, 2009 7:52 PM > To: Puppet Users > Subject: [Puppet Users] Re: Pattern matching in case

[Puppet Users] Re: Pattern matching in case statement

2009-01-21 Thread sven.thomas
nd end Sven -Original Message- From: puppet-users@googlegroups.com [mailto:puppet-us...@googlegroups.com] On Behalf Of Jeff Leggett Sent: Tuesday, January 20, 2009 7:52 PM To: Puppet Users Subject: [Puppet Users] Re: Pattern matching in case statement I just did something similar to pars

[Puppet Users] Re: Pattern matching in case statement

2009-01-21 Thread Trevor Vaughan
Mike, I would use a server side function that uses either LDAP or a flat file to determine the attributes applied to the node. Although, if you need this to be more 'real time', you'll probably want to look at something like ControlTier, Capistrano, or Func. Trevor On Wed, Jan 21, 2009 at 04:3

[Puppet Users] Re: Pattern matching in case statement

2009-01-21 Thread Mike Pountney
On 20 Jan 2009, at 18:52, Jeff Leggett wrote: > > I just did something similar to parse out what proxy my client should > use - for a custom fact do: > > Facter.add(:network) do > setcode do > srcIP = Facter.value(:ipaddress) > octets = srcIP.split (/\./ ) > > > >end > end

[Puppet Users] Re: Pattern matching in case statement

2009-01-20 Thread Jeff Leggett
I just did something similar to parse out what proxy my client should use - for a custom fact do: Facter.add(:network) do setcode do srcIP = Facter.value(:ipaddress) octets = srcIP.split (/\./ ) end end On Jan 19, 7:08 am, wrote: > Hi all, > > I need my servers to d

[Puppet Users] Re: Pattern matching in case statement

2009-01-19 Thread Felix Schäfer
Am 19.01.2009 um 13:08 schrieb : > I need my servers to decide which network they are in (i.e. dmz), > and the only clue is the servers IP-address. I was trying to > accomplish it like this, but it doesn’t work: > > case $ipaddress { > "10.1.1.*": { > $network = "net1" >

[Puppet Users] Re: Pattern matching in case statement

2009-01-16 Thread Robin Lee Powell
On Thu, Jan 15, 2009 at 04:37:53PM -, sven.tho...@bt.com wrote: > Hi all, > > > > I need my servers to decide which network they are in (i.e. dmz), and > the only clue is the servers IP-address. I was trying to accomplish it > like this, but it doesn't work: > > > > case $ipaddress { >