[Puppet Users] Cleanup after timeout in exec resource

2010-12-17 Thread Erwin Bolwidt
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 get some data that is necessary to create the file. This timeou

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

2010-12-17 Thread Gary Larizza
in! > > On Fri, Dec 17, 2010 at 12:51 PM, Nigel Kersten wrote: > On Fri, Dec 17, 2010 at 9:02 AM, Brian LaShomb wrote: >> Nan, MacPorts ended up the same. >> This is where it ends up... >> https://img.skitch.com/20101217-c2jbed6q8psp6r8yqr3gfd8ayr.jpg >> When I run it

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

2010-12-17 Thread Brian LaShomb
up... > > https://img.skitch.com/20101217-c2jbed6q8psp6r8yqr3gfd8ayr.jpg > > When I run it without debug, the last line output is "notice: Starting > > Puppet master version 2.6.4" > > I'm gonna try it on a linux distro as I have no experience with it > running

[Puppet Users] Priority of collection entries

2010-12-17 Thread rjl
Hi all, I am creating (or allowing creation) of collections of servers on which to perform some action. Does anyone have any suggestion as to how to set priority if a server is contained in one or more collections. I could write a ruby script to handle this but I was wonder if there is any 'typica

Re: [Puppet Users] if then statement within file resource

2010-12-17 Thread CraftyTech
That worked out Wondering why it didn't inside the file resource... but it the workaround is certainly is "legit" enough Thanks, -- 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...@google

Re: [Puppet Users] if then statement within file resource

2010-12-17 Thread Eric Sorenson
On Dec 17, 2010, at 12:51 PM, CraftyTech wrote: > I'm not able to do an if/then statement within a file resource > declaration. I'm basically trying to distinguish between OS release, so that > I can assign an appropriate template. This is what I have: Yes the language tutorial on condit

Re: [Puppet Users] if then statement within file resource

2010-12-17 Thread Mark Stanislav
What about just doing: if ($operatingsystemrelease <= 5.4) { $sudo_template = "system/sudoers_V54.erb" } else { $sudo_template = "system/sudoers.erb" } class basic_dev::files { file { "/etc/sudoers": owner => root, group => root, mode => 0440,

Re: [Puppet Users] if then statement within file resource

2010-12-17 Thread Disconnect
You can do it magically with source, not sure about template though. source => ["puppet:///system/sudoers_$operatingsysstemrelease","puppet:///system/sudoers"] (it will look for them in order. We have several that go hostname, $lsbdistcodename, generic.) If it doesn't work for template, you can d

[Puppet Users] if then statement within file resource

2010-12-17 Thread CraftyTech
Hello All, I'm not able to do an if/then statement within a file resource declaration. I'm basically trying to distinguish between OS release, so that I can assign an appropriate template. This is what I have: class basic_dev::files { file { "/etc/sudoers": owner => root,

[Puppet Users] bootstrapping puppetmaster on passenger / syntax ideas

2010-12-17 Thread Adam Heinz
I've been working on a puppet module to bootstrap a 0.25.5 puppetmaster based on these instructions: http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger There is a point in the installation where you need to start /etc/init.d/puppetmaster to get it to generate the necessary .pem files,

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

2010-12-17 Thread Bryan Horstmann-Allen
+-- | On 2010-12-17 10:38:54, Don Jackson wrote: | | I was attempting to set up some cron jobs via puppet. | | I was trying to get cron to mail the output of the cron jobs to a specific user, so I was | attempting to set

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

2010-12-17 Thread Nigel Kersten
On Fri, Dec 17, 2010 at 9:02 AM, Brian LaShomb wrote: > Nan, MacPorts ended up the same. > This is where it ends up... > https://img.skitch.com/20101217-c2jbed6q8psp6r8yqr3gfd8ayr.jpg > When I run it without debug, the last line output is "notice: Starting > Puppet master

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

2010-12-17 Thread Don Jackson
I was attempting to set up some cron jobs via puppet. I was trying to get cron to mail the output of the cron jobs to a specific user, so I was attempting to set mailto=u...@example.com, via the environment => specifier. Puppet did as it was told. Unfortunately, I guess that Solaris 10 does n

Re: [Puppet Users] Re: exec prior to changes

2010-12-17 Thread CraftyTech
Thanks Nan... It really helped out a lot. -- 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, send email to puppet-users+unsubscr...@googlegroups.co

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

2010-12-17 Thread bluebook
Thanks everyone for the pointers. I've gone with the Virtual Resources approach because (a) the description of them more or less exactly matches my use case, and (b) because from a class perspective I'm trying to follow the "is a web server" type of paradigm, and "is a jre-jce" doesn't really work

Re: [Puppet-dev] Re: [Puppet Users] What am I doing wrong?

2010-12-17 Thread Umair Ghani
this works...thanks again.. Umair On Fri, Dec 17, 2010 at 10:12 AM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Thu, Dec 16, 2010 at 06:34:53PM -0600, Umair Ghani wrote: > > One more question. How can I run hostmanager as a particular user? By > > default it runs it as user root

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

2010-12-17 Thread luke.bigum
That's a fair point, but I shy away from using variables in one class to influence another as much as possible for two reasons. First is Puppet's variable scope is confusing at best. Second is I like to have my classes do actions on a specific bit of a system entirely within themselves, so anything

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

2010-12-17 Thread Brian LaShomb
Nan, MacPorts ended up the same. This is where it ends up... https://img.skitch.com/20101217-c2jbed6q8psp6r8yqr3gfd8ayr.jpg When I run it without debug, the last line output is "notice: Starting Puppet master version 2.6.4" I'm gonna try it on a linux distro as I have no exp

Re: [Puppet Users] puppetmaster 100%cpu usage on 2.6 (not on 0.24)

2010-12-17 Thread Ashley Penney
As a datapoint, I experience this problem on RHEL6: ruby-1.8.7.299-4.el6.x86_64 Gems: passenger (3.0.0) rack (1.2.1) rack-mount (0.6.13) rack-test (0.5.6) rails (3.0.3) On Fri, Dec 17, 2010 at 11:27 AM, Leonid Batizhevsky wrote: > Ruby or puppet? > I start use from 0.25.x (from epel repo and n

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

2010-12-17 Thread Stefan Schulte
On Fri, Dec 17, 2010 at 07:46:29AM -0800, luke.bigum wrote: > Nigel's Virtual Resources is one way, this is another using only > classes. > > You can put the base software in classes of their own and include > these in your 'server classes'. Classes can be included multiple times > on a node witho

Re: [Puppet Users] puppetmaster 100%cpu usage on 2.6 (not on 0.24)

2010-12-17 Thread Leonid Batizhevsky
Ruby or puppet? I start use from 0.25.x (from epel repo and not long) and 1.8.5 ruby. Then I update to 2.6.0 and I saw memory problems. I start to google and found: http://projects.puppetlabs.com/projects/1/wiki/Puppet_Red_Hat_Centos "The 1.8.5 branch of Ruby shipped will RHEL5 can exhibit memory

Re: [Puppet Users] Re: exec prior to changes

2010-12-17 Thread Nan Liu
On Fri, Dec 17, 2010 at 8:20 AM, CraftyTech wrote: > I spoke too quickly...  It executes on refresh, but it still does it after > the changes, and not before, which kind of defeats the purpose of my backup > script... If someone else has a suggestion, I'd happy to hear it.. > Thanks, This doesn't

Re: [Puppet-dev] Re: [Puppet Users] What am I doing wrong?

2010-12-17 Thread Stefan Schulte
On Thu, Dec 16, 2010 at 06:34:53PM -0600, Umair Ghani wrote: > One more question. How can I run hostmanager as a particular user? By > default it runs it as user root. > > Thanks > Umair I never used that one but puppet has a util function for that purpose (asuser defined in util/suidmanager.rb).

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

2010-12-17 Thread luke.bigum
Nigel's Virtual Resources is one way, this is another using only classes. You can put the base software in classes of their own and include these in your 'server classes'. Classes can be included multiple times on a node without causing errors. You'll want something that looks like: class jre-jc

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

2010-12-17 Thread Nigel Kersten
On Fri, Dec 17, 2010 at 7:33 AM, Brian LaShomb wrote: > Thanks Nigel, > I deleted the /etc/puppet and /var/lib/puppet directories and then recreated > the /var/lib/puppet directory with puppet user/group ownership. I then reran > the package installers. No more rrd error. But it still hangs on the

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

2010-12-17 Thread Brian LaShomb
Thanks Nigel, I deleted the /etc/puppet and /var/lib/puppet directories and then recreated the /var/lib/puppet directory with puppet user/group ownership. I then reran the package installers. No more rrd error. But it still hangs on the "Finishing Transaction" line. I had already created the puppe

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

2010-12-17 Thread Nigel Kersten
On Fri, Dec 17, 2010 at 7:17 AM, bluebook wrote: > Hello, > > I'm new to puppet, so maybe this is a silly question, but an hour of > googling has thrown up nothing. > > I am trying to define a set of classes which each represent different > server types in my architecture, for example "dns server"

Re: [Puppet Users] Re: exec prior to changes

2010-12-17 Thread CraftyTech
I spoke too quickly... It executes on refresh, but it still does it after the changes, and not before, which kind of defeats the purpose of my backup script... If someone else has a suggestion, I'd happy to hear it.. Thanks, -- You received this message because you are subscribed to the Goog

[Puppet Users] Referencing the same package from multiple classes

2010-12-17 Thread bluebook
Hello, I'm new to puppet, so maybe this is a silly question, but an hour of googling has thrown up nothing. I am trying to define a set of classes which each represent different server types in my architecture, for example "dns server" and "web server". A single machine may perform more than one

Re: [Puppet Users] Re: exec prior to changes

2010-12-17 Thread Felix Frank
On 12/16/2010 11:31 PM, CraftyTech wrote: > Answered my own question. Basically you'd need to use: refreshonly => true. Yes, but have you gotten puppet to do the exec before it updates the resource in question? If so, I'd like to know how you did that ;) Cheers, Felix -- You received this mess

Re: [Puppet Users] Exec resource doc appears outdated

2010-12-17 Thread Felix Frank
On 12/16/2010 11:16 PM, Lucas Ewalt wrote: > Hoping someone can shed some light on this. > > In the Puppet resource type doc at > http://docs.puppetlabs.com/references/stable/type.html#exec > it says this about exec: > > "It is worth noting that exec is special, in that it is not currently > con

Re: [Puppet Users] Issue upgrading to 2.6.3

2010-12-17 Thread Felix Frank
On 12/16/2010 05:44 PM, Stu Teasdale wrote: > Hi all, > > I seem to be having an odd issue since upgrading from 0.25.4 to 2.6.3 > with a template based external file resource. On the clients that > define the resource I get the following error: > > err: Could not retrieve catalog from remote se

Re: [Puppet Users] Re: n00b questions - verbosity of config????

2010-12-17 Thread Tim Watts
On 17/12/10 05:37, Nan Liu wrote: On Thu, Dec 16, 2010 at 2:57 PM, Tim Watts wrote: Sorry - I don;t understand this - is this pure ruby or puppet language? Just to indicate it's an optional parameter, since default behavior is handled as seen below. if $mode != "" { File { mode =>