[Puppet Users] Making a file out of fragments

2009-06-19 Thread jchonig
I'm building apt source files in /etc/apt/sources.list.d on Ubuntu based on a recipe on the puppet site. This does have a few problems though. Some apps expect /etc/apt/sources.list to exist and get upset if it doesn't. I'd rather combine the individual files into one file that replaces / etc/a

[Puppet Users] Re: Is there a way to write to a file using puppet

2009-06-19 Thread lance dillon
On Fri, Jun 19, 2009 at 2:41 PM, RijilV wrote: > > 2009/6/19 Swati Tiwari : > > Hey Guys, > > > > I am sorry if this sounds silly but I am new to puppet. I am trying to > > append a particular line to the apt.conf file on all the clients that are > > running puppetd. Is there any way to do this u

[Puppet Users] exec "sudo apt-get -t unstable install rubygems" fails!

2009-06-19 Thread Swati Tiwari
Hi Everyone, I am trying to install the latest unstable binary of rubygems using the following exec exec { "latestrubygems": command => "sudo apt-get -t unstable install rubygems" } I have the apt.conf and the sources.list file updated correctly for this command to work. This command

[Puppet Users] Re: Testing if a resource is already defined

2009-06-19 Thread Avi Miller
On 20/06/2009, at 8:01 AM, Scott Smith wrote: > Why don't you just define it virtually and realize it at will? Because the value for the IP address changes depending on where it appears in the manifest. I'm working in an environment where each server has at least 2 and up to 6 addresses, an

[Puppet Users] Re: Testing if a resource is already defined

2009-06-19 Thread Scott Smith
Avi Miller wrote: > Eric Gerlach wrote: >> It sounds like you might be trying to define a host in more than one place. >> I'm just a journeryman myself, but I think according to The Puppet Way (TM) >> that's a Bad Thing (TM). > > Yes, I am and yes, it is, but I don't have (much) choice without ma

[Puppet Users] Re: Testing if a resource is already defined

2009-06-19 Thread Avi Miller
Eric Gerlach wrote: > It sounds like you might be trying to define a host in more than one place. > I'm just a journeryman myself, but I think according to The Puppet Way (TM) > that's a Bad Thing (TM). Yes, I am and yes, it is, but I don't have (much) choice without making our manifests rather

[Puppet Users] Re: Testing if a resource is already defined

2009-06-19 Thread Eric Gerlach
On Thu, Jun 18, 2009 at 12:14:59PM +1000, Avi Miller wrote: > > Hi gang, > > Is it possible to test if a particular resource has already been > defined? I'd like to do something like this: > > if !Host["$fqdn"] { > host {"$fqdn": ip => "$ipaddress_eth0" } > } > > Essentially, test to see

[Puppet Users] Re: removing resources no longer specified

2009-06-19 Thread Udo Waechter
Hi. We also do this for most of our classes and it increases the code that has to be written. Usually we have something like: class foo { $presence_real = $presence { "" => "present', "absent" => "absent" } file{"xyz": ensure => $presence_real,

[Puppet Users] Re: Testing if a resource is already defined

2009-06-19 Thread Udo Waechter
Hello, On 18.06.2009, at 10:03, Peter Meier wrote: Hi Is it possible to test if a particular resource has already been defined? I'd like to do something like this: if !Host["$fqdn"] { host {"$fqdn": ip => "$ipaddress_eth0" } } Essentially, test to see if there is no Host resource define

[Puppet Users] Having trouble with a new type

2009-06-19 Thread Pratod
Hi all, I am writing a new type to handle files like sysctl.conf that are basically name value pairs. Being new to both ruby and Puppet, I know am doing something ridiculous. This is the error I get: Could not autoload "/var/lib/puppet/lib/puppet/provider/hash_config/ hash_config.rb": wrong numb

[Puppet Users] Re: Automatically creating subdirectories?

2009-06-19 Thread Douglas Garstang
Thanks. Good to know I wasn't missing something. On Fri, Jun 19, 2009 at 11:43 AM, Douglas wrote: > > I'm relatively new to puppet. > > Searched online, and could not find an answer to this. I have the > following manifest snippet... > > class openvpn { >package { openvpn: ensure => latest }

[Puppet Users] Re: Automatically creating subdirectories?

2009-06-19 Thread Peter Meier
Hi > Yeah, this is an old and know issue (unfortunately). > > Original bug report: > http://projects.reductivelabs.com/issues/86 well bug or more a philosphical question? The comments in the bug report describe a bit the problem puppet would run into if puppet would auto-create them. puppet m

[Puppet Users] Re: Automatically creating subdirectories?

2009-06-19 Thread RijilV
2009/6/19 Douglas > > I'm relatively new to puppet. > > Searched online, and could not find an answer to this. I have the > following manifest snippet... > > [snip] > > Shouldn't puppet automatically create all the subdirectories above usr/ > share/openvpn/easy-rsa/2.0 directory for me? If

[Puppet Users] Re: passenger on Mac OS X question

2009-06-19 Thread Nigel Kersten
On Fri, Jun 19, 2009 at 10:02 AM, Allan Marcus wrote: > > I think I found the issue. Looks like Passenger only works on Intel > Macs. I'm using a PPC server for dev work. I will try on Intel. Really? You should be able to compile it on PPC fine? The passenger directives from the apache manual sh

[Puppet Users] Automatically creating subdirectories?

2009-06-19 Thread Douglas
I'm relatively new to puppet. Searched online, and could not find an answer to this. I have the following manifest snippet... class openvpn { package { openvpn: ensure => latest } file { "/usr/share/openvpn/easy-rsa/2.0/keys": ensure => directory, owner => root, group

[Puppet Users] Re: how to have "multilines" ?

2009-06-19 Thread Marziani, Michael
If this has already been mentioned in this thread i'm sorry (or if you're not using an apt/yum capable system), but doesn't it seem simpler to learn how to create a package of this and then you can simply use the package facility: package { $blender_current: ensure => installed } best regards,

[Puppet Users] Re: Is there a way to write to a file using puppet

2009-06-19 Thread RijilV
2009/6/19 Swati Tiwari : > Hey Guys, > > I am sorry if this sounds silly but I am new to puppet. I am trying to > append a particular line to the apt.conf file on all the clients that are > running puppetd. Is there any way to do this using puppet. Any help would be > appreciated! > > Thank you! >

[Puppet Users] Is there a way to write to a file using puppet

2009-06-19 Thread Swati Tiwari
Hey Guys, I am sorry if this sounds silly but I am new to puppet. I am trying to append a particular line to the apt.conf file on all the clients that are running puppetd. Is there any way to do this using puppet. Any help would be appreciated! Thank you! -- Regards, Swati --~--~-~--~-

[Puppet Users] Re: passenger on Mac OS X question

2009-06-19 Thread Allan Marcus
I think I found the issue. Looks like Passenger only works on Intel Macs. I'm using a PPC server for dev work. I will try on Intel. --- Thanks, Allan Marcus 505-667-5666 On Jun 18, 2009, at 5:38 PM, Allan Marcus wrote: > > I think this might be a RUBYLIB issues. What is the best way to tel

[Puppet Users] Re: how to have "multilines" ?

2009-06-19 Thread Trevor Vaughan
Serge, If you want to do it this way, I would ditch the file type and do it all in an exec: define install_blender ( $version, $server ) { exec { "snarf_blender_$version": command =>"wget -O /tmp/blender_$version.tar.gz http://$server/blender_$version.tar.gz; Just write the rest of your sh