Re: [Puppet Users] Appending to Variables in a global context

2010-12-20 Thread Spenser Gilliland
On Sun, Dec 19, 2010 at 4:26 PM, Daniel Pittman wrote: > On Mon, Dec 20, 2010 at 01:34, Spenser Gilliland wrote: > >> That's still ugly but I see how it works.  I think I'll give it a shot >> that way see how it goes >> >> I still need to do something to make sure that the class is >> instantiate

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Daniel Pittman
On Mon, Dec 20, 2010 at 01:34, Spenser Gilliland wrote: > That's still ugly but I see how it works.  I think I'll give it a shot > that way see how it goes > > I still need to do something to make sure that the class is > instantiated after the tables are instantited. > > Run stages maybe? Uhh, s

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Spenser Gilliland
That's still ugly but I see how it works. I think I'll give it a shot that way see how it goes I still need to do something to make sure that the class is instantiated after the tables are instantited. Run stages maybe? Uhh, still ugly. I wish there was just some kind of syntactical element for

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Matthew Macdonald-Wallace
On Sun, 2010-12-19 at 04:40 -0600, Spenser Gilliland wrote: > Matthew, > > I'm a bit confused on your code, how does an instance get added to the db? Yeah, that's probably my fault... :D My thought was that if you have a known path to the redmine instances you could create a ruby class which it

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Spenser Gilliland
On Sun, Dec 19, 2010 at 4:40 AM, Spenser Gilliland wrote: > On Sun, Dec 19, 2010 at 4:14 AM, Matthew Macdonald-Wallace > wrote: >> On Sun, 2010-12-19 at 01:51 -0600, Spenser Gilliland wrote: >>> Yeap, I'm seeing that it doesn't exist yet either.  I'm thinking maybe >>> I can use exported resource

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Spenser Gilliland
On Sun, Dec 19, 2010 at 4:14 AM, Matthew Macdonald-Wallace wrote: > On Sun, 2010-12-19 at 01:51 -0600, Spenser Gilliland wrote: >> Yeap, I'm seeing that it doesn't exist yet either.  I'm thinking maybe >> I can use exported resources or maybe just an exec that increments a >> counter on the host.

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Matthew Macdonald-Wallace
On Sun, 2010-12-19 at 01:51 -0600, Spenser Gilliland wrote: > Yeap, I'm seeing that it doesn't exist yet either. I'm thinking maybe > I can use exported resources or maybe just an exec that increments a > counter on the host. Either way it's not very pretty. My use case is > as follows: > > In

Re: [Puppet Users] Appending to Variables in a global context

2010-12-19 Thread Matthias Saou
Spenser Gilliland wrote: > Yeap, I'm seeing that it doesn't exist yet either. I'm thinking maybe > I can use exported resources or maybe just an exec that increments a > counter on the host. Either way it's not very pretty. My use case is > as follows: > > In Debian, Redmine has the option of

Re: [Puppet Users] Appending to Variables in a global context

2010-12-18 Thread Spenser Gilliland
On Sat, Dec 18, 2010 at 6:09 PM, Daniel Pittman wrote: > On Sun, Dec 19, 2010 at 08:24, Spenser Gilliland wrote: > >> I've come into a use case where I need a list of all the instances of >> a definition.  I'd like the syntax to be > > [...] > >> I'm not sure if this will work as anticipated.  I

Re: [Puppet Users] Appending to Variables in a global context

2010-12-18 Thread Daniel Pittman
On Sun, Dec 19, 2010 at 08:24, Spenser Gilliland wrote: > I've come into a use case where I need a list of all the instances of > a definition.  I'd like the syntax to be [...] > I'm not sure if this will work as anticipated.  I believe that this > will only update $instance in the test::instan

[Puppet Users] Appending to Variables in a global context

2010-12-18 Thread Spenser Gilliland
I've come into a use case where I need a list of all the instances of a definition. I'd like the syntax to be class test { $instances = [] } define test::instance() { $instance += ["$name"] } I'm not sure if this will work as anticipated. I believe that this will only update $instance i