[Puppet Users] Setting up puppetmaster-passenger on Debian

2011-06-29 Thread Stefan Midjich
I am at the end of my rope here so I pray to the gods that puppet-users can help. Using Debian apt-get install puppetmaster-passenger you get a fairly complete puppetmaster setup. I have the Pro Puppet book next to me and following Chapter 4 on setting up Puppet with Passenger I can see that apt h

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-29 Thread Andreas Zuber
> > # make ssl request > > connection = Net::HTTP.new(url.host, url.port) > > connection.use_ssl = true > > connection.cert = OpenSSL::X509::Certificate.new(File.read(certpath)) > > connection.key = OpenSSL::PKey::RSA.new(File.read(pkey_path)) > > you are missing the CA file... something lik

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-29 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > [root@foo me]# ./puppet-wget file_content/sudo/sudoers > https://foo.bar:8140/file_content/sudo/sudoers > warning: peer certificate won't be verified in this SSL session > /usr/lib/ruby/1.8/net/http.rb:2099:in `error!': 403 "Forbidden request: > foo.

Re: [Puppet Users] Re: Eclipse Task Tags

2011-06-29 Thread Henrik Lindberg
Hi, please file an enhancement request for this (at https://github.com/cloudsmith/geppetto/issues) as this is something that needs to be added to Geppetto. Comments must be parsed to find the "todos" and turn them into Tasks (this is easy). It is a bit more involved to keep the tasks in sync as

Re: [Puppet Users] Augeas match & Puppet

2011-06-29 Thread Rob McBroom
On Jun 6, 2011, at 9:45 PM, Michael Knox wrote: > The following works ... > onlyif=> "match FW_CONFIGURATIONS_EXT/value[.='$svc'] size == 0", Couldn’t you just do this and not have to deal with “onlyif” at all? set FW_CONFIGURATIONS_EXT/value[.='$svc'] $svc Read the section of the wiki

Re: [Puppet Users] Dashboard & LDAP ENC's

2011-06-29 Thread Rob McBroom
On Jun 22, 2011, at 2:37 PM, Craig White wrote: > I've restarted both puppetmaster and apache (Dashboard is running on > passenger) and still, I don't see the above system in 'Nodes' though I > haven't run or even installed puppet on that system. Shouldn't it show up in > Dashboard as a node th

[Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Craig White
This seems to work but it does seem perilous and ugly. A meta description of what I am trying to do is: - install firebird sql server - replace the 'security' file with a known file - restart the firebird service I'm not going to include firebird::install class because the part that worries me i

Re: [Puppet Users] Dashboard & LDAP ENC's

2011-06-29 Thread Craig White
On Jun 29, 2011, at 8:23 AM, Rob McBroom wrote: > On Jun 22, 2011, at 2:37 PM, Craig White wrote: > >> I've restarted both puppetmaster and apache (Dashboard is running on >> passenger) and still, I don't see the above system in 'Nodes' though I >> haven't run or even installed puppet on that

[Puppet Users] can't deploy custom facts

2011-06-29 Thread brijesh
Hi I have been having issue with deploying my custom facts. I have gone through wiki on puppet labs and few other blogs but has no luck so far. May be i am not understanding puppet very well. I would really appreciate if someone helps me with this. I have the following fact i want to deploy. Fact

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Daniel Piddock
On 29/06/11 16:34, Craig White wrote: > This seems to work but it does seem perilous and ugly. A meta description of > what I am trying to do is: > - install firebird sql server > - replace the 'security' file with a known file > - restart the firebird service > > I'm not going to include firebird

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Aaron Grewell
I'd be tempted to write another file as well as part of the initial config (/var/lib/firebird/configured or something), then check for its (non)existence before pushing the file out. On Wed, Jun 29, 2011 at 8:34 AM, Craig White wrote: > This seems to work but it does seem perilous and ugly. A me

Re: [Puppet Users] can't deploy custom facts

2011-06-29 Thread Craig White
On Jun 29, 2011, at 1:16 AM, brijesh wrote: > Hi > > I have been having issue with deploying my custom facts. I have gone > through wiki on puppet labs and few other blogs but has no luck so > far. May be i am not understanding puppet very well. I would really > appreciate if someone helps me wi

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Craig White
That's what I was thinking too but I worry that someone may feel compelled to tidy things up ;-) I can see it now... echo "Delete me and you will die" > /root/firebird_security_file_deployed_do_not_delete Craig On Jun 29, 2011, at 9:00 AM, Aaron Grewell wrote: > I'd be tempted to write a

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Nigel Kersten
I've long wanted the equivalent of a "conffile" in Puppet. e.g. "replace this file if it's still the same as the one Puppet put down, but if it's been modified from the default, don't replace it" I've wanted this in the past for things like a user .rc file, where you want to be able to continuall

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Brian Gallew
On Jun 29, 2011, at 9:05 AM, Nigel Kersten wrote: > I've long wanted the equivalent of a "conffile" in Puppet. > > e.g. "replace this file if it's still the same as the one Puppet put down, > but if it's been modified from the default, don't replace it" > > I've wanted this in the past for thin

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Aaron Grewell
That would be sweet. For system-level files I want to overwrite and keep a known state, but at the user level I would love to be able to push a default and then let them customize. You can get something similar with concat by including a local file with additions but since modifications to the co

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Craig White
Thanks - answers inline... On Jun 29, 2011, at 8:57 AM, Daniel Piddock wrote: > On 29/06/11 16:34, Craig White wrote: >> This seems to work but it does seem perilous and ugly. A meta description of >> what I am trying to do is: >> - install firebird sql server >> - replace the 'security' file wi

Re: [Puppet Users] can't deploy custom facts

2011-06-29 Thread Craig White
On Jun 29, 2011, at 1:16 AM, brijesh wrote: > Hi > > I have been having issue with deploying my custom facts. I have gone > through wiki on puppet labs and few other blogs but has no luck so > far. May be i am not understanding puppet very well. I would really > appreciate if someone helps me wi

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Craig White
On Jun 29, 2011, at 9:14 AM, Brian Gallew wrote: > On Jun 29, 2011, at 9:05 AM, Nigel Kersten wrote: > >> I've long wanted the equivalent of a "conffile" in Puppet. >> >> e.g. "replace this file if it's still the same as the one Puppet put down, >> but if it's been modified from the default, d

[Puppet Users] Re: Setting requirements using collection -vs- before/require meta-parameters

2011-06-29 Thread Jon Jaroker
> > So it looks like we have a bug that I'm still trying to find in the > database, and I think it might be affecting you. > > If you have a class that only declares other classes in it, and doesn't have > any resources in it, then it gets removed from the dependency graph. > Hello Nigel, To tes

[Puppet Users] <<>> imports, defined(), and conflicts

2011-06-29 Thread Rich Rauenzahn
We're trying to write a rule that <<>> imports a bunch of nagios Nagios_host rules. But then we take a list of machines and add Nagios_host rules for them as well. Some of the systems might overlap, and we were hoping to use puppet to weed them out. We assumed if we did class a { Nagios_host <<

Re: [Puppet Users] Re: Setting requirements using collection -vs- before/require meta-parameters

2011-06-29 Thread Nigel Kersten
On Wed, Jun 29, 2011 at 9:54 AM, Jon Jaroker wrote: > > Please let me know if you want me to create a bug for this, or whether > you have debugging or workaround recommendations. > I'll read your post a bit more closely later on today, but a quick suggestion would be to use the --graph output on

Re: [Puppet Users] Dashboard & LDAP ENC's

2011-06-29 Thread Rob McBroom
On Jun 29, 2011, at 11:40 AM, Craig White wrote: > I am still uncertain whether we will have enough servers to actually bother > with maintaining hosts in LDAP just for puppet. Might not be worth it if it’s “just for puppet”, but once you have everything in LDAP, there are limitless possibiliti

[Puppet Users] AIX clients

2011-06-29 Thread Rob McBroom
Is there anything current on getting a Puppet client going on AIX? The wiki has a really old document that doesn’t really tell you how to install in the first place. Google indicates that using gems should work, but right off the bat with facter, I’m told that it can’t proceed because I need som

RE: [Puppet Users] AIX clients

2011-06-29 Thread Kinzel, David
>-Original Message- >From: puppet-users@googlegroups.com >[mailto:puppet-users@googlegroups.com] On Behalf Of Rob McBroom >Sent: Wednesday, June 29, 2011 11:55 AM >To: puppet-users@googlegroups.com >Subject: [Puppet Users] AIX clients > >Is there anything current on getting a Puppet client

[Puppet Users] Re: can't deploy custom facts

2011-06-29 Thread brijesh
Hi Craig, Thanks for your reply. I understand your concern about using ruby code instead of shell but my question how can i deploy this custom fact. The code has no error if i copy this fact into /usr/lib/ruby/1.8/facter and then run facter curtime it returns the output. The only thing is how can

Re: [Puppet Users] Re: can't deploy custom facts

2011-06-29 Thread Craig White
I don't know about 'factsync' on client 'puppet.conf on my puppet clients, having [main] ... pluginsync=true seems to run the custom facts automatically Craig On Jun 29, 2011, at 2:02 PM, brijesh wrote: > Hi Craig, > > Thanks for your reply. I understand your concern about using ruby co

[Puppet Users] Re: can't deploy custom facts

2011-06-29 Thread brijesh
Thank You Very Much Craig that worked. On Jun 30, 9:12 am, Craig White wrote: > I don't know about 'factsync' on client 'puppet.conf > > on my puppet clients, having > [main] >   ... >   pluginsync=true > > seems to run the custom facts automatically > > Craig > > On Jun 29, 2011, at 2:02 PM,

Re: [Puppet Users] Re: can't deploy custom facts

2011-06-29 Thread Craig White
I should reiterate that you should use the interactive ruby shell, irb to test your code to make sure that it runs within ruby. You really should be using ruby for everything that you possibly can. If you can learn bash programming then ruby should be a piece of cake and provide readability dow

[Puppet Users] Re: can't deploy custom facts

2011-06-29 Thread brijesh
sure i am right now changing it from bash to ruby. Brijesh On Jun 30, 10:55 am, Craig White wrote: > I should reiterate that you should use the interactive ruby shell, irb to > test your code to make sure that it runs within ruby. > > You really should be using ruby for everything that you poss

[Puppet Users] Puppet agent creates certificates for localhost.localdomain and does not pick up the changed hostname

2011-06-29 Thread Sriramu Singaram
Hi Everyone, I am using Puppet 2.6.5 to configure fresh VMs. These VMs have their hostname set to localhost.localdomain initially at boot-time. There is this script file that runs in rc.local and this is what I do inside it 1. I change the hostname from localhost to xxx.xx using the hostnam

Re: [Puppet Users] syntax highlighting on emacs

2011-06-29 Thread Tony G.
On Tue, Jun 28, 2011 at 2:00 PM, Sylvain wrote: > Hi guys, > > I'm trying to install the syntax highlighting on emacs for Puppet. > I'm using the configuration files provide on > http://projects.reductivelabs.com/repositories/browse/puppet/ext/emacs > > When I open a .pp file I got this error: >

[Puppet Users] How to define a hash table and loop over them in a definition?

2011-06-29 Thread Haitao Jiang
This may have been asked before, if so, please excuse me and point me to the right direction. What I want to do is to define a hash table with multiple key->value pairs. I would like to pass this variable to a file template and generate a result file with all the mappings listed. Based on what I r

[Puppet Users] Re: How to define a hash table and loop over them in a definition?

2011-06-29 Thread treydock
Here's an example of how I have done this, and also a good way to test the idea... I created test.pp with these contents...you can also specify the $apparray else where, for example in the node definition $apparray = { app1 => { 'path' => '/test/path1', 'command' => 'cmd1' }, app2 => { '

Re: [Puppet Users] Re: How to define a hash table and loop over them in a definition?

2011-06-29 Thread vagn scott
On 06/29/2011 09:56 PM, treydock wrote: <% apparray.each do |key,value| -%> Key:<%= key %> Path:<%= value['path'] %> Command:<%= value['command'] %> <% end -%> inline_template() can be used as a here document. that plus a puppet shebang line makes testing and presenting examples really easy.

[Puppet Users] Re: Puppet agent creates certificates for localhost.localdomain and does not pick up the changed hostname

2011-06-29 Thread brijesh
on ubuntu you have to change the /etc/hostname file and set hostname there which should do the job. it depends on the distro you are using you need to change the file accordingly. Brijesh On Jun 30, 12:47 pm, Sriramu Singaram wrote: > Hi Everyone, > > I am using Puppet 2.6.5 to configure fresh

[Puppet Users] making puppetd immortal

2011-06-29 Thread vagn scott
In my reading I just ran across this: [Puppet - Bug #7273] Modifying puppet.conf causes 'reparsing config' and TERM signal results in shutdown of daemon short version: puppet agent can commit suicide, but it can't raise itself from the dead. However, init is immortal, and so

Re: [Puppet Users] making puppetd immortal

2011-06-29 Thread Scott Smith
Well, changing a runlevel just to stop a daemon is a bit heavy handed. There are other tools that perform this in a more flexible manner: Runit, Daemontools, Monit, Supervisord, etc. -scott On Wed, Jun 29, 2011 at 10:33 PM, vagn scott wrote: > In my reading I just ran across this: > >[