Re: [Puppet Users] [SOLVED] line replace triggers file reload

2011-06-01 Thread Giovanni Bordello
Sorted, I've done it using a template: search <%= dns_search_path %> nameserver ... nameserver ... That way the file is (presumably?) created on the master and looks constant to the client. GiBo On 02/06/11 17:59, Giovanni Bordello wrote: Hi, it's a modified replace() function taken from h

Re: [Puppet Users] line replace triggers file reload

2011-06-01 Thread Giovanni Bordello
Hi, it's a modified replace() function taken from here: http://projects.puppetlabs.com/projects/1/wiki/Simple_Text_Patterns define line_replace($pattern, $replacement) { $file = $name err ("line_replace... $name") exec { "/usr/bin/perl -pi -e 's/$pattern/$replacement/' '$file'":

Re: [Puppet Users] line replace triggers file reload

2011-06-01 Thread yzhk...@gmail.com
perhaps you should add a check :onlyif cannot find pattern(dns_search_path) in resolv.conf,then puppet actions. can you paste your full code . I didnot see the define or param class or (custom type?)line_replace? thank you~~~ >From China mainland[?] On Thu, Jun 2, 2011 at 1:01 PM, Giovanni Bo

Re: [Puppet Users] ruby dsl manifests

2011-06-01 Thread Dan Bode
you should be able to do something like: call_function(:defined, 'Foo['bar']') just keep in mind that the defined function (or anything for resource detection) is parse order dependent which can lead to unexpected results. On Wed, Jun 1, 2011 at 9:04 PM, Matt wrote: > I've been searching and h

[Puppet Users] line replace triggers file reload

2011-06-01 Thread Giovanni Bordello
Hi guys, I've got /etc/resolve.conf managed by Puppet: file { "/etc/resolv.conf": ensure => present, source => "puppet:///modules/system/etc/resolv.conf.${dns_zone}.${dc_use}", group => "root", owner => "root",

[Puppet Users] ruby dsl manifests

2011-06-01 Thread Matt
I've been searching and havent found an answer yet. Is there a scope or variable that I can parse to find out if a resource is defined? I know there is the defined command in puppet manifests. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To p

Re: [Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread Patrick
On Jun 1, 2011, at 1:30 PM, Jacob Helwig wrote: > On Wed, 01 Jun 2011 23:58:24 +0400, Pavel Shevaev wrote: >> >>> Mitigation for 4: >>> 1) If the combined size of the files are small, you can try using "content" >>> instead of "source" for the files. >> >> Wow, that did the trick Thanks a l

[Puppet Users] "Open Source Team" planning meeting summary 2011-06-1

2011-06-01 Thread Jacob Helwig
Thanks to everyone that provided their feedback on what they would like to see worked on. We've gone through the suggestions, and re-prioritized our back-log to take into account the various suggestions, and the state of each of the tickets. Next week, I don't plan on directly soliciting with a "

Re: [Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread Pavel Shevaev
> You end up saving a potentially large number of HTTP round-trips, which > adds up. Thanks for explanations -- Best regards, Pavel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups

Re: [Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread Jacob Helwig
On Wed, 01 Jun 2011 23:58:24 +0400, Pavel Shevaev wrote: > > > Mitigation for 4: > > 1) If the combined size of the files are small, you can try using "content" > > instead of "source" for the files. > > Wow, that did the trick Thanks a lot! Deployment time is now 10-12 > seconds. I'm a puppe

Re: [Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread Pavel Shevaev
> Mitigation for 4: > 1) If the combined size of the files are small, you can try using "content" > instead of "source" for the files. Wow, that did the trick Thanks a lot! Deployment time is now 10-12 seconds. I'm a puppet newbie and don't quite understand why it worked but it's great :) --

[Puppet Users] Re: Any good documentation NGINX + Passenger + Puppet?

2011-06-01 Thread Luc Suryo
Well I got it working! The mistake I made was mixing mongrel and passenger So I have now a 'working' nginx + passenger + puppet Still doing some test BUT the one things I did found out is that the file /etc/puppet/auth.conf need to be adjusted... Still some weird issue : 1. files get changed

R: Re: [Puppet Users] Any good documentation NGINX + Passenger + Puppet?

2011-06-01 Thread pinto.e...@gmail.com
I have found a nice description in the new book " pro puppet " by Apress. It worth reading for other reason as well. Jmho, i have not direct interest in promoting the book. Best regards Messaggio originale Da: Aaron Grewell Inviato: 01/06/2011, 17:59 A: puppet-users@googlegroups.com Ogg

Re: [Puppet Users] Re: "Open Source Team" planning meeting summary

2011-06-01 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi First, I would like to thank for that open process and the commitment you are putting into that. And I'm really excited that there is now a team dedicated to address the things in core puppet. Awesome! Thanks! However, as this thread seemed to bec

[Puppet Users] Re: puppet and environments ... need help

2011-06-01 Thread Jake - USPS
Nan, Thanks for your help. That seems to be the issue for me. I'll have to consider that when doing some of the things I do! Thanks everyone for your responses! Regards, Jake On Jun 1, 1:48 pm, Nan Liu wrote: > On Wed, Jun 1, 2011 at 11:31 AM, Jake - USPS wrote: > > > > > > > > > > > I'm tr

Re: [Puppet Users] puppet and environments ... need help

2011-06-01 Thread Nan Liu
On Wed, Jun 1, 2011 at 11:31 AM, Jake - USPS wrote: > I'm trying to use environments and seem to be failing.  Right now I > have 4 defined environments: production, cat, development, beta > > They are defined as follows on my puppetmaster: > > cat /etc/puppet/puppet.conf > [main] > pluginsync = tr

Re: [Puppet Users] puppet and environments ... need help

2011-06-01 Thread Aaron Grewell
Make sure you've put your environment into the agent's puppet.conf. Despite appearances in the ENC docs you cannot set this value properly except on the client. On Wed, Jun 1, 2011 at 11:31 AM, Jake - USPS wrote: > I'm trying to use environments and seem to be failing. Right now I > have 4 defi

[Puppet Users] Getting information from puppet modules

2011-06-01 Thread Corey Osman
Hi, I have created a few modules with the puppet-module generate function and I wanted to know how I can use some of the module's json features to get metadata information from the module. Is there an api to get this module info? "puppet-module generate cosman-test" creates the following dir

[Puppet Users] puppet and environments ... need help

2011-06-01 Thread Jake - USPS
I'm trying to use environments and seem to be failing. Right now I have 4 defined environments: production, cat, development, beta They are defined as follows on my puppetmaster: cat /etc/puppet/puppet.conf [main] pluginsync = true vardir = /var/lib/puppet manifest = /etc/puppet/environments/pro

Re: [Puppet Users] Re: "Open Source Team" planning meeting summary

2011-06-01 Thread Nathan Clemons
I'd suggest looking into http://projects.puppetlabs.com/issues/3238 if you have a chance. It's been open a long time and is an inconvenience when using stored configs. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, May 31, 2011 at 5:08 P

Re: [Puppet Users] Semantic differences between selector and if/then?

2011-06-01 Thread Aaron Grewell
OK, I did some more testing and while the error message is different with the selector using if/then doesn't really fix the issue. The underlying problem is that testing a hash with an undefined LHS doesn't work the way I'd expect it to. It should return false, but as long as the hash itself exis

Re: [Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread Patrick
On Jun 1, 2011, at 7:04 AM, pachanga wrote: > Hi! > > I'm incrementally developing puppet rules on the master server and > applying them to the testing machine. For some reason puppet agent > applies changes from the master very slowly, about 3 minutes every > time. At this speed it's very tires

Re: [Puppet Users] Certificate problems

2011-06-01 Thread Patrick
On Jun 1, 2011, at 8:05 AM, John Kennedy wrote: > I have several servers being hosted on Amazon Web Services. They have all > been build from the same manifest so apart from the hostnames, IP, etc they > are all identical. > > All but 3 of the boxes can connect to the puppetmaster. When kicked

Re: [Puppet Users] How do I enable repositories and install packages

2011-06-01 Thread Jacob Helwig
If you want to enable the repositories on a per-package basis as was shown in the examples (with the --enablerepo flag), then you'll definitely want to watch & vote for #4113[1]. If you want to have the repositories always enabled, then you should be able to do that through the yum configuration.

Re: [Puppet Users] ANNOUNCE: Facter 1.5.9 Final!

2011-06-01 Thread Mark Phillips
On 31 May 2011, at 18:19, Mark Phillips wrote: > On 20 May 2011, at 19:48, Jacob Helwig wrote: > >> Facter 1.5.9 is a maintenance release containing fixes and updates. >> > > There's a CSW test release for Solaris at > http://buildfarm.opencsw.org/experimental.html#markp > > Once I've had a c

Re: [Puppet Users] How do I enable repositories and install packages

2011-06-01 Thread Nathan Clemons
The package resource type will allow you to install packages via Yum, but does not (last I checked) support specifying repos to enable/disable (which I'd dearly love if it was added). Which means you either get to write your own extension to package to add that functionality, or use exec. -- Nath

[Puppet Users] How do I enable repositories and install packages

2011-06-01 Thread hyzhang
Hi, My shell script is as below. How do I translate them to puppet language? I think I can use exec directly. But is there a better way? /usr/bin/yum clean all /bin/echo -e "\n/usr/bin/yum -y --enablerepo=base,rpmforge install mplayer mplayer-skins" /usr/bin/yum -y --enablerepo=base,rpmforge inst

Re: [Puppet Users] Any good documentation NGINX + Passenger + Puppet?

2011-06-01 Thread Aaron Grewell
Passenger setup is annoyingly complicated since you're having to set up Apache, configure Ruby as an application server on top of that and then install the Puppetmaster on top of that. To add to the fun, Apache configs are different between distributions, it's different between releases of Puppet

Re: [Puppet Users] Semantic differences between selector and if/then?

2011-06-01 Thread Aaron Grewell
Good point, sorry I left out the error message: err: Could not retrieve catalog from remote server: Error 400 on SERVER: No matching value for selector param '' at /usr/share/puppet/environments/testing/modules/users/manifests/init.pp:142 on node The value isn't an array, it's a hash. I noticed

[Puppet Users] Certificate problems

2011-06-01 Thread John Kennedy
I have several servers being hosted on Amazon Web Services. They have all been build from the same manifest so apart from the hostnames, IP, etc they are all identical. All but 3 of the boxes can connect to the puppetmaster. When kicked from the puppetmaster two give: Host host.example.com failed:

Re: [Puppet Users] Removing links

2011-06-01 Thread John Kennedy
On Tue, May 31, 2011 at 18:36, Nick Lewis wrote: > On Tuesday, May 31, 2011 at 2:58 AM, John Kennedy wrote: > > I have a group of web servers being load balanced. I have 4 types of > servers all build from the same image. > When I build the image I forgot to clear out one of the sym links from >

[Puppet Users] Puppet 2.6.8 agent slow execution

2011-06-01 Thread pachanga
Hi! I'm incrementally developing puppet rules on the master server and applying them to the testing machine. For some reason puppet agent applies changes from the master very slowly, about 3 minutes every time. At this speed it's very tiresome to test the new rules... I'm running puppet agent as

Re: [Puppet Users] Re: "Open Source Team" planning meeting summary

2011-06-01 Thread Nigel Kersten
On Wed, Jun 1, 2011 at 1:20 AM, Patrick wrote: > > On May 31, 2011, at 9:01 PM, Alan Sparks wrote: > > > On 5/31/2011 9:07 PM, Jacob Helwig wrote: > >> On Tue, 31 May 2011 20:56:47 -0600, Alan Sparks wrote: > >>> > On Tue, May 31, 2011 at 5:08 PM, Jacob Helwig

Re: [Puppet Users] Semantic differences between selector and if/then?

2011-06-01 Thread Brice Figureau
On Tue, 2011-05-31 at 17:29 -0700, Aaron Grewell wrote: > Should the C-style selector and if/then statements have equivalent > true/false handling? Maybe I'm setting this up wrong, but I expected > these two to be the same: > > if $name[symlink]{ $symlink= $name[symlink]} else > { $sy

Re: [Puppet Users] Puppet testing and adoption strategies

2011-06-01 Thread Nikolay Sturm
* Tim Coote [2011-06-01]: > I'm trying to work out the best way to use Puppet to control an > existing estate, and then how to refactor the configurations. I'd like I don't believe there to be a best way, it depends on your situation. When I introduced puppet at our company, I chose to start from

[Puppet Users] Puppet testing and adoption strategies

2011-06-01 Thread Tim Coote
Hullo I'm trying to work out the best way to use Puppet to control an existing estate, and then how to refactor the configurations. I'd like to use the appropriate tools where I can (eg taking distros to get consistent sets of packages, package managers for the bulk of deployment). During the adop

Re: [Puppet Users] Re: "Open Source Team" planning meeting summary

2011-06-01 Thread Patrick
On May 31, 2011, at 9:01 PM, Alan Sparks wrote: > On 5/31/2011 9:07 PM, Jacob Helwig wrote: >> On Tue, 31 May 2011 20:56:47 -0600, Alan Sparks wrote: >>> On Tue, May 31, 2011 at 5:08 PM, Jacob Helwig >>> > wrote: Just a quick reminder that we're go