[Puppet Users] problem with tag()?

2009-01-06 Thread Grzegorz MarszaƂek
Hello When I run this with puppet 0.24.7 (puppet --debug test2.pp): File { backup => false } define cfile { tag("$name") file { "/tmp/cfile_$name": content => "test" } file { "/tmp/dfile_$name": content => "test" } } @cfile { "s1": } @cfile { "s2": } @cfile { "s3": } Cfile <| tag=="

[Puppet Users] Get list of all nodes

2009-01-06 Thread John Philips
Hi, Is there a way to export a list of all manually-defined nodes in a puppet configuration? I need to use this list in a script. Previously it was easy because I had each node individually defined in nodes.pp ala node 'blah1.com' { include stuff } node 'blah2.com' { include stuff }

[Puppet Users] Re: Get list of all nodes

2009-01-06 Thread Mike Renfro
On 1/6/2009 10:09 AM, John Philips wrote: > Is there a way to export a list of all manually-defined nodes in a > puppet configuration? At least on a Debian 0.24.6 puppetmaster, it appears that you can examine the .yaml files in $vardir/yaml/node -- I'd assume that works for any type of defined

[Puppet Users] Re: Get list of all nodes

2009-01-06 Thread John Philips
Mike, I thought about that, but a directory listing includes all nodes that have connected to the puppetmaster (old or decommissioned servers, etc.). I'd like to get a list of nodes that are currently defined in the nodes.pp file. --- On Tue, 1/6/09, Mike Renfro wrote: > From: Mike Renfro

[Puppet Users] Re: Get list of all nodes

2009-01-06 Thread Paul Lathrop
Use LDAP. I couldn't resist. :-P In all seriousness, though, grep is still your friend. He's brought a couple new friends to the table to help you with this problem; their names are "sed" and "awk". With the example below, this should give you what you want: grep ^node site.pp | sed -e 's/^nod

[Puppet Users] Re: Get list of all nodes

2009-01-06 Thread John Philips
> Use LDAP. > > I couldn't resist. :-P Har har. > With the example below, this should give you what you want: > > grep ^node site.pp | sed -e 's/^node //' | awk -F, > '{for(i=1;i<=NF;i++) {print $i}}' Thanks, that did the trick. Well, almost. The hostnames are in quotation marks so I pipe

[Puppet Users] Example of using puppetrun for 1-off service restarts?

2009-01-06 Thread Allan Bailey
Does anyone have an example of using puppetrun for one-off service restarts? I'm trying to avoid ssh access to hosts for such things, and I'm hoping there's a way to use puppetrun. I've tried the following in my puppet module: from the modules/puppet/manifests/init.pp: class puppet { [...

[Puppet Users] Re: Get list of all nodes

2009-01-06 Thread Paul Lathrop
On Tue, Jan 6, 2009 at 9:50 AM, John Philips wrote: > Thanks, that did the trick. Well, almost. The hostnames are in quotation > marks so I piped it to yet another program for the final touch. > > grep ^node site.pp | sed -e 's/^node //' | awk -F, '{for(i=1;i<=NF;i++) > {print $i}}' | cut -d

[Puppet Users] Re: Redundant Puppet Master Servers

2009-01-06 Thread Digant C Kasundra
> If you want to do failover with puppet servers and you are using > environments, there's a major gotcha that I really should add to that > page... > > > If a puppet client connects to server A, downloads the compiled > manifest, and then starts requesting files via the puppet:/// > protocol,

[Puppet Users] A few questions regarding puppet

2009-01-06 Thread sdotsen
1 - my clients pull the changes from the master server only if i restart the puppet client. I waited half an hour and my test (modify permissions on dummy file) never went through. If i restart the client the changes come through right away. 2 - if i make a change in my class (adding or modifying

[Puppet Users] Noob - What means "Cannot access mount[plugins]" ?

2009-01-06 Thread Olivier
Hi, I'm new to Puppet. I installed Puppet on Debian Lenny (version is 0.24.5). When I'm trying to use puppet locally (on the machine I installed puppetmaster on), I keep getting messages such as : err: /File[/var/lib/puppet/lib]: Failed to generate additional resources during transaction: Cannot

[Puppet Users] Script Contribution?

2009-01-06 Thread Zach
I have the following ruby scripts I would like to see implemented into puppet, I believe they could compliment puppet and with input from the puppet community would be useful. RCAudit - what services are started on boot up (runlevel 3), what is xinetd starting. CronAudit - what cron jobs are runn

[Puppet Users] Re: Noob - What means "Cannot access mount[plugins]" ?

2009-01-06 Thread Robin Lee Powell
On Tue, Jan 06, 2009 at 11:23:56AM +0100, Olivier wrote: > Hi, > > I'm new to Puppet. > I installed Puppet on Debian Lenny (version is 0.24.5). > > When I'm trying to use puppet locally (on the machine I installed > puppetmaster on), I keep getting messages such as : > err: /File[/var/lib/puppet

[Puppet Users] Re: Redundant Puppet Master Servers

2009-01-06 Thread Nigel Kersten
On Tue, Jan 6, 2009 at 2:13 PM, Digant C Kasundra wrote: > > > > If you want to do failover with puppet servers and you are using > > environments, there's a major gotcha that I really should add to that > > page... > > > > > > If a puppet client connects to server A, downloads the compiled > > ma

[Puppet Users] Re: A few questions regarding puppet

2009-01-06 Thread Ben Beuchler
> 1 - my clients pull the changes from the master server only if i > restart the puppet client. I waited half an hour and my test (modify > permissions on dummy file) never went through. If i restart the client > the changes come through right away. What do the logs (on both client and server) sh

[Puppet Users] inherit and override?

2009-01-06 Thread Ben Beuchler
I'm fairly certain I encountered the preferred pattern for inheriting from a class for the specific purpose of disabling it. I can't seem to find it anymore. Any pointers? A specific example would be our ldapauth module. The main class installs a few packages and files in order to activate LDA

[Puppet Users] Re: inherit and override?

2009-01-06 Thread AJ Christensen
class x inherits y { Resource["name"] { parameter => "newvalue" } } http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#id6 Regards, AJ On 7/01/09 3:18 PM, "Ben Beuchler" wrote: > > I'm fairly certain I encountered the preferred pattern for inheriting > from a class

[Puppet Users] Re: inherit and override?

2009-01-06 Thread Mike Renfro
Ben Beuchler wrote: > I'm fairly certain I encountered the preferred pattern for inheriting > from a class for the specific purpose of disabling it. I can't seem > to find it anymore. Any pointers? The ones I use are a bit different than AJ's, and don't really use inheritance. Don't know if I

[Puppet Users] Re: Script Contribution?

2009-01-06 Thread Jason Rojas
Put them somewhere that we can download them from. I am already interested in converting some of these to facts.. On Jan 6, 2009, at 8:10 AM, Zach wrote: > > I have the following ruby scripts I would like to see implemented into > puppet, I believe they could compliment puppet and with input fro

[Puppet Users] Re: Redundant Puppet Master Servers

2009-01-06 Thread Adam Jacob
On Jan 6, 2009, at 2:13 PM, Digant C Kasundra wrote: >> >> If a puppet client connects to server A, downloads the compiled >> manifest, and then starts requesting files via the puppet:/// >> protocol, and in the middle of all these short lived requests the >> server switches over to Server B, that

[Puppet Users] Re: Noob - What means "Cannot access mount[plugins]" ? [SOLVED]

2009-01-06 Thread Olivier
2009/1/6 Robin Lee Powell > > On Tue, Jan 06, 2009 at 11:23:56AM +0100, Olivier wrote: > > Hi, > > > > I'm new to Puppet. > > I installed Puppet on Debian Lenny (version is 0.24.5). > > > > When I'm trying to use puppet locally (on the machine I installed > > puppetmaster on), I keep getting mess