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

Re: [Puppet Users] Help with Puppet install on OS X Server

2010-12-18 Thread Brian LaShomb
Thanks Gary! I'll check this out. On Fri, Dec 17, 2010 at 8:52 PM, Gary Larizza wrote: > Brian, > > I've got a bunch of OS X/Puppet info here --> > http://links.huronstudents.com/puppet ; maybe it will be helpful? > > Gary > > On Friday, December 17, 2010, Brian LaShomb wrote: > > Ah Yes, it

Re: [Puppet Users] Re: Referencing the same package from multiple classes

2010-12-18 Thread Ken Barber
Can you elaborate? On Saturday, December 18, 2010 7:23:57 PM UTC, kc7zzv wrote: > > > On Dec 18, 2010, at 3:50 AM, Ken Barber wrote: > > > For the record, an alternative that I don't believe was mentioned is to > do something like: > > > > if !defined(Package["foo"]) { > > package {"foo": ensu

Re: [Puppet Users] Cleanup after timeout in exec resource

2010-12-18 Thread Ken Barber
Shame wget doesn't do this for you. I'm sure there is a better tool to do .part files. Anyway, taking from kc7zzv's excellent idea ... something as simple as the following might do as a work-around: exec {"wget-foo": command => "/usr/bin/wget http://mirror.ox.ac.uk/sites/mirror.centos.org/5.5

Re: [Puppet Users] Re: Referencing the same package from multiple classes

2010-12-18 Thread Patrick
On Dec 18, 2010, at 3:50 AM, Ken Barber wrote: > For the record, an alternative that I don't believe was mentioned is to do > something like: > > if !defined(Package["foo"]) { > package {"foo": ensure => installed } > } In general this is a bad idea though. Mostly because it can surprise yo

[Puppet Users] Re: Priority of collection entries

2010-12-18 Thread rjl
Hi Ken, I have a module that will set the forwarding IPs in the snmptrapd.conf: - My init.pp file for the module is as follows -- class snmp { file { "snmptrap

[Puppet Users] Re: Recent (unfun) experience with cron resource on Solaris 10 with puppet 0.25.5

2010-12-18 Thread russell.fulton
little historical note for the record Solaris cron is old -- system V or BSD 4.2. Most (all ?) Linux distros and modern *BSDs use Paul Vixie's Cron which has all the flexibility that we know and love. I suspect that AIX will be similar to Solaris -- painful. Russell -- You received this

[Puppet Users] Re: Cleanup after timeout in exec resource

2010-12-18 Thread dan.achim
Hi, I think that the cleanest way to go about this is to create a bash / perl / python / whatever script that does the wget and watches the exit status of it, cleaning it up if it was unsuccessful. Then you would add this script to your puppet recipe as a "file" resource and execute this script in

[Puppet Users] Re: Referencing the same package from multiple classes

2010-12-18 Thread Ken Barber
For the record, an alternative that I don't believe was mentioned is to do something like: if !defined(Package["foo"]) { package {"foo": ensure => installed } } ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, sen

[Puppet Users] Re: Priority of collection entries

2010-12-18 Thread Ken Barber
I'm not sure I follow? Perhaps an example of what you are trying to achieve would help. ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, se

[Puppet Users] Re: Autorequiring and dependency problem

2010-12-18 Thread Jay N.
Thanks John and Stefan. Sorry for the delay to answer. Actually, the /etc/puppet object was too ambitious, I modified it to handle every file and subdirectory under /etc/puppet. Like that, it's a lot easier to handle dependencies and ownership. Also, it's troublesome to handle the svn under /etc/

Re: [Puppet Users] Cleanup after timeout in exec resource

2010-12-18 Thread Patrick
On Dec 17, 2010, at 9:45 PM, Erwin Bolwidt wrote: > Hi, > > When I use an exec resource to create a file, a timeout may occur. As an > example, I can run wget to get a file (not the most elegant solution but > necessary sometimes), or run some other program that depends on the network > to ge