[Puppet Users] Re: Do resources support some form of inheritance/prototyping?

2009-09-15 Thread James Turnbull
2009/9/16 James Turnbull : > file { ["file1", "file2", "file3"]: >    owner=root, >    group=bin, >    mode=754, > } That should read: file { ["file1", "file2", "file3"]: owner => root, group => bin, mode => 754, } Regards James Turnbull -- Author of: * Pro Linux Systems Administrat

[Puppet Users] Re: Do resources support some form of inheritance/prototyping?

2009-09-15 Thread Bostjan Skufca
I believed that defaults could only be set for global scope. Funny:) Thank you both for your hints! b. On Sep 16, 2:58 am, Nigel Kersten wrote: > On Tue, Sep 15, 2009 at 5:39 PM, Bostjan Skufca > wrote: > > > > > > > Hi! > > > Does anybody know, if resources can be inherited? > > > Example:

[Puppet Users] Re: Do resources support some form of inheritance/prototyping?

2009-09-15 Thread James Turnbull
2009/9/16 Nigel Kersten : > > > On Tue, Sep 15, 2009 at 5:39 PM, Bostjan Skufca > wrote: >> >> Hi! >> >> Does anybody know, if resources can be inherited? >> >> Example: >> >> I would like to define three files with owner=root and group=bin and >> mode=754. >> To do that you can write: >> file {

[Puppet Users] Re: error starting puppetmaster after upgrade to 0.25.0

2009-09-15 Thread James Turnbull
2009/9/16 Chris Blumentritt : > I overcame this issue by uninstalling all instances of puppet, re installing > 0.25.0 and then changing into the gem directory and running install.rb by > hand.  I agree with the need for rubygems to distinguish between bin and > sbin but I also need the executables

[Puppet Users] Re: Do resources support some form of inheritance/prototyping?

2009-09-15 Thread Nigel Kersten
On Tue, Sep 15, 2009 at 5:39 PM, Bostjan Skufca wrote: > > Hi! > > Does anybody know, if resources can be inherited? > > Example: > > I would like to define three files with owner=root and group=bin and > mode=754. > To do that you can write: > file { "file1": > owner=root, > group=bin, > mode=

[Puppet Users] Do resources support some form of inheritance/prototyping?

2009-09-15 Thread Bostjan Skufca
Hi! Does anybody know, if resources can be inherited? Example: I would like to define three files with owner=root and group=bin and mode=754. To do that you can write: file { "file1": owner=root, group=bin, mode=754, } file { "file2": owner=root, group=bin, mode=754, } file { "file3

[Puppet Users] Re: is it possible to pass a node variable to file source in a class?

2009-09-15 Thread Mark Christian
Thank you for taking the time to demonstrate how to implement a template. This is exactly what I needed. On Sep 15, 3:28 pm, Eric Heydrick wrote: > That should work. However, a more puppetish way of doing it is using a > template to generate ntp.conf. I'm guessing the only difference between >

[Puppet Users] Re: error starting puppetmaster after upgrade to 0.25.0

2009-09-15 Thread Chris Blumentritt
I overcame this issue by uninstalling all instances of puppet, re installing 0.25.0 and then changing into the gem directory and running install.rb by hand. I agree with the need for rubygems to distinguish between bin and sbin but I also need the executables :) On Mon, Sep 14, 2009 at 12:21 PM,

[Puppet Users] Re: is it possible to pass a node variable to file source in a class?

2009-09-15 Thread Eric Heydrick
That should work. However, a more puppetish way of doing it is using a template to generate ntp.conf. I'm guessing the only difference between your ntp.conf's is the server setting. Here's how you could do it with a template: in site.pp specify ntp servers for each site, e.g.: case $site {

[Puppet Users] Re: is it possible to pass a node variable to file source in a class?

2009-09-15 Thread Mark Christian
Following the example in the CommonMisconceptions I've done away with the inherits "base_node" and have instead included the class base_node and can now successfully pass my $site variable. However I can't seem to include the variable in the "source" parameter for "file" type. For now I'm using

[Puppet Users] Re: Preventing concurrent puppetd updates

2009-09-15 Thread Pete Emerson
Silviu, I think it's a pretty good solution, though. I'm actually contemplating writing a simple job scheduler that would eliminate this problem, but wanted to make sure that I'm not missing something obvious like a built-in queuing system or something like that. On Sep 15, 2:14 pm, Silviu Parag

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread seph
Jon Stanley writes: > So for the benefit of the list, I figured out that the problem was not > *using* the virtual resource multiple times, it was with defining it > multiple times. Huh. Indeed. I swear it used to be different. Ah well, either it changed when I wasn't looking, or I'm confused.

[Puppet Users] Re: Preventing concurrent puppetd updates

2009-09-15 Thread Silviu Paragina
Now I realize that this is not so portable :-?? you could try creating a simple pp file and run it with puppet (not puppetd) which would essentially do the same thing. Silviu On Wed, 16 Sep 2009 00:02:07 +0300, Silviu Paragina wrote: > The error message gives you the solution, check for the e

[Puppet Users] Re: Puppet and Amazon EC2

2009-09-15 Thread Garrett Honeycutt
On Sep 14, 6:49 am, Robin Sheat wrote: > Op dinsdag 15 september 2009 01:29:09 schreef CaptTofu: > > > * Having the certificate requests for these new instances > > automatically signed > > * Creating a new node for a new instance, once it is up and I know the > > host/ip. As you know, you don't

[Puppet Users] Re: Preventing concurrent puppetd updates

2009-09-15 Thread Silviu Paragina
The error message gives you the solution, check for the existence of /var/lib/puppet/state/puppetdlock. My solution would be invoke-rc.d puppet stop #or /etc/init.d/puppet or whatever while [ -f /var/lib/puppet/state/puppetdlock ] do sleep 1 done #do your stuff Silviu On Tue, 15 Sep 2009

[Puppet Users] Preventing concurrent puppetd updates

2009-09-15 Thread Pete Emerson
I'm using puppet (0.24, working on the 0.25 migration) to do rolling upgrades across our datacenter. I'm running puppet as a daemon. In order to change an application version, I modify a database, which in turn modifies the data that my puppet_node_classifier presents. I then ssh to the nodes th

[Puppet Users] Re: is it possible to pass a node variable to file source in a class?

2009-09-15 Thread Silviu Paragina
I thinks you are in the case explained here http://reductivelabs.com/trac/puppet/wiki/CommonMisconceptions Silviu Mark Christian wrote: > say I have a couple nodes: > > node 'uk-host' inherits basenode { > $site = "UK" > } > node 'ap-host' inherits basenode { > $site = "AP" > } > > Is

[Puppet Users] Remove user from a specific group?

2009-09-15 Thread Jos Backus
How do I tell Puppet to remove a user from a specific group? I need this capability in order to be able to back out the change below. The specified account may or may not be in other groups so I cannot use `membership => inclusive'. Example: group { 'dbusers': gid=> 881,

[Puppet Users] is it possible to pass a node variable to file source in a class?

2009-09-15 Thread Mark Christian
say I have a couple nodes: node 'uk-host' inherits basenode { $site = "UK" } node 'ap-host' inherits basenode { $site = "AP" } Is it possible to pass the $site variable to the file resource source parameter?: class ntp { package { ntp: ensure => installed } file { "/etc/ntp.co

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread Jon Stanley
On Tue, Sep 15, 2009 at 9:55 AM, David Schmitt wrote: > will include "something" and "something::foo", but I'd advise against > such hacks except for the most desperate cases. So for the benefit of the list, I figured out that the problem was not *using* the virtual resource multiple times, it

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread David Schmitt
Jon Stanley wrote: > On Tue, Sep 15, 2009 at 9:41 AM, David Schmitt wrote: > >> My typical pattern in that case looks like this: > > Right, but what if the "something" in /etc/something is unknown and > you need to define multiple things under /etc/something (say > /etc/something/1 and /etc/som

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread Jon Stanley
On Tue, Sep 15, 2009 at 9:41 AM, David Schmitt wrote: > My typical pattern in that case looks like this: Right, but what if the "something" in /etc/something is unknown and you need to define multiple things under /etc/something (say /etc/something/1 and /etc/something/2)? In the end, there's

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread David Schmitt
Jon Stanley wrote: > On Tue, Sep 15, 2009 at 8:30 AM, seph wrote: > >> I'd love to not worry about realizing >> the same user twice. > > I thought that was the whole point of virtual resources, though - you > can realize the same resource as many times as you'd like and only end > up with one c

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread Jon Stanley
On Tue, Sep 15, 2009 at 8:30 AM, seph wrote: > I'd love to not worry about realizing > the same user twice. I thought that was the whole point of virtual resources, though - you can realize the same resource as many times as you'd like and only end up with one copy of it. I'm thinking the dupl

[Puppet Users] Re: Question on proper use of virtual resources

2009-09-15 Thread seph
I run into this problem often. I usually encounter it trying to make independent modules A and B, which both depend on some directory. Or even just around realizing users, I'd love to not worry about realizing the same user twice. Anyhow, it's imperfect, but you can check if something is defined,

[Puppet Users] Re: Puppet / EC2 noob question

2009-09-15 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris wrote: > Thanks to everyone who's replied so far (and please, keep the ideas > coming!); it's really useful looking at all the various approaches > that people are taking. > > I think so far I like Tim's variation on Andreas' approach the best,

[Puppet Users] Re: Puppet / EC2 noob question

2009-09-15 Thread Chris
Thanks to everyone who's replied so far (and please, keep the ideas coming!); it's really useful looking at all the various approaches that people are taking. I think so far I like Tim's variation on Andreas' approach the best, though I think that if/when we have more AMIs running, Dave's puppetm

[Puppet Users] Re: Puppet cannot find custom functions

2009-09-15 Thread James Turnbull
2009/9/15 Ben Lavender : > > Just so that it gets onto the mailing list for the next poor guy > searching for this: > > Functions need to be in a file of the same name, it would appear.  I > can find nothing in the wiki that mentions this specifically, but > perhaps I did not look hard enough. It

[Puppet Users] Re: Puppet cannot find custom functions

2009-09-15 Thread Ohad Levy
On 9/15/09, Ben Lavender wrote: > > > I renamed my file from functions.rb to minute_from_address.rb and it Like a function that converts your ip address into a "random" value? see http://reductivelabs.com/trac/puppet/wiki/Recipes/cron in the Setting Cron using a Puppet custom function :) Ohad

[Puppet Users] Re: Puppet cannot find custom functions

2009-09-15 Thread Ben Lavender
Just so that it gets onto the mailing list for the next poor guy searching for this: Functions need to be in a file of the same name, it would appear. I can find nothing in the wiki that mentions this specifically, but perhaps I did not look hard enough. I renamed my file from functions.rb to m

[Puppet Users] Re: Puppet / EC2 noob question

2009-09-15 Thread Matt
2009/9/14 dmangot : > > On Sep 11, 5:07 am, Chris wrote: >> Hi all, >> >> I'm starting to use EC2, and I'm after some examples of best practices/ >> tips and tricks from folk with more experience of the Puppet/EC2 combo >> than me: >> >> We're starting by using EC2 for testing and development pur

[Puppet Users] Re: Puppet 0.25 migration

2009-09-15 Thread Matt
I used the example one from 0.25 - changed the hostname for the cert, and the path for the DocumentRoot/Directory. 2009/9/11 philipp Hanselmann : > > Matt schrieb: >> For info - I removed passenger 2.2.5, installed 2.2.2 - rebuilt the >> passenger apache module, then removed all traces of puppet