[Puppet Users] Re: does puppet allow to a client specify a value in a configuration file?

2011-04-20 Thread rowan holmes
Hi Denmat and Felix Thanks both of you very much for your help -- 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.com. To unsubscribe from this group, send email to puppet-users+unsub

Re: [Puppet Users] is it possible to take definition parameters from a database?

2011-04-20 Thread Ben Hughes
On Tue, Apr 19, 2011 at 02:21:39PM -0700, rowan holmes wrote: > I really wonder that can we use a database for our definition calls. > assume that we have a definition which is used for adding virtual > hosts to apache configuration file like below: You can, quite happily, but you have to write i

[Puppet Users] Re: is it possible to take definition parameters from a database?

2011-04-20 Thread rowan holmes
> I don't know about doing it via puppet - I suspect not without custom > Functions and/or outside help. > > I assume you know about this: > > http://httpd.apache.org/docs/2.0/vhosts/mass.html > > and deem it not suitable. Thanks Russell, I know about that but I asked in general -- You receive

Re: [Puppet Users] Re: is there a definition of the abstract service type

2011-04-20 Thread Ben Hughes
On Wed, Apr 20, 2011 at 10:42:21AM -0700, Tim Coote wrote: > [I'm using the training machine from puppetlabs] > puppet resource service xinetd Which one? Not all of them use xinetd. Certainly the CentOS 5 machine I have doesn't have xinetd. So it won't report it as a service. Querying it directly

Re: [Puppet Users] Installing port on FreeBSD

2011-04-20 Thread Nigel Kersten
On Fri, Apr 15, 2011 at 3:26 PM, fafaforza wrote: > New user trying to get a port to compile:  I tried searching but all I > get are links to the FreeBSD port of puppet.  Easier to find a needle > in a haystack. > > A class has: > > exec { "port-sudo": >    cwd             => "/usr/ports/security/

Re: [Puppet Users] how to catch errors

2011-04-20 Thread Daniel Pittman
On Wed, Apr 20, 2011 at 13:46, Pavel Piatruk wrote: > Even if puppet rule sets are OK, sometimes errors occur on puppet clients upon > processing puppet rules. > What are the best practices to catch/analyze them? Puppet logs to syslog out of the box; we used a combination of our regular log coll

[Puppet Users] how to catch errors

2011-04-20 Thread Pavel Piatruk
Hello! Even if puppet rule sets are OK, sometimes errors occur on puppet clients upon processing puppet rules. What are the best practices to catch/analyze them? signature.asc Description: This is a digitally signed message part.

[Puppet Users] Re: how to fix symbolic links

2011-04-20 Thread Sans
Thank you guys!! So many possibilities, I love that. BTW, can it be protected against the current version number, so that if the future version breaks the link it'll be automatically created? Cheers!! -- You received this message because you are subscribed to the Google Groups "Puppet Users" gro

[Puppet Users] Re: is there a definition of the abstract service type

2011-04-20 Thread Tim Coote
Intriguingly, on a fedora 13 host, using puppet-0.25.5-1.fc13.noarch, information about xinetd *is* returned by puppet resource service. the version on the learning machine is: pe-puppet-2.6.4-7.el5 Is the change in behaviour a bug? how can I tell? On Apr 20, 6:42 pm, Tim Coote wrote: > Hi Ben

Re: [Puppet Users] Re: is there a definition of the abstract service type

2011-04-20 Thread Markus Falb
On 20.4.2011 20:30, Tim Coote wrote: > On Apr 20, 8:13 am, Felix Frank > wrote: >> Also note that under the puppet paradigm, a "service" is not something >> reachable via network (as in "services provided through xinetd"), but >> can be any process that is maintained by use of an init-script. >

[Puppet Users] Re: Installing port on FreeBSD

2011-04-20 Thread fafaforza
On Apr 20, 3:11 am, Felix Frank wrote: > > "require => Package['port-sudo']" wouldn't work, and I don't see an > > 'onlyif' or similar parameter under "package" > > Yes it does. > > What semantics are you gunning for? "Only install X on boxes where Y is > getting installed" is a tough call. > Y

[Puppet Users] Re: is there a definition of the abstract service type

2011-04-20 Thread Tim Coote
On Apr 20, 8:13 am, Felix Frank wrote: > On 04/20/2011 03:17 AM, Ben Hughes wrote: > > > On Tue, Apr 19, 2011 at 04:24:18AM -0700, Tim Coote wrote: > > >> Is there a canonical definition of the service type abstraction, or is > >> the definition just how the implementation behaves? > > > What happ

Re: [Puppet Users] how to fix symbolic links

2011-04-20 Thread Nigel Kersten
On Wed, Apr 20, 2011 at 10:51 AM, Gabriel Filion wrote: > Hello, > > On 11-04-20 01:02 PM, Martin Alfke wrote: >> On Apr 20, 2011, at 6:07 PM, Sans wrote: >>> Say for example, this is the  package, already installed on the >>> system: >>> >>> # rpm -qa | grep lfc-libs >>> lfc-libs-1.8.0-1sec.sl5 >

Re: [Puppet Users] how to fix symbolic links

2011-04-20 Thread Gabriel Filion
Hello, On 11-04-20 01:02 PM, Martin Alfke wrote: > On Apr 20, 2011, at 6:07 PM, Sans wrote: >> Say for example, this is the package, already installed on the >> system: >> >> # rpm -qa | grep lfc-libs >> lfc-libs-1.8.0-1sec.sl5 >> lfc-libs-1.8.0-1sec.sl5 >> >> and I want a symbolic: "liblfc.so ->

[Puppet Users] Re: is there a definition of the abstract service type

2011-04-20 Thread Tim Coote
Hi Ben [I'm using the training machine from puppetlabs] puppet resource service xinetd returns info about xinetd. But puppet resource service does not include anything about xinetd, which sounds like a bug to me. I understand the limitations of what can be recovered, but that's an implementation

Re: [Puppet Users] how to fix symbolic links

2011-04-20 Thread Martin Alfke
On Apr 20, 2011, at 6:07 PM, Sans wrote: > Dear all, > > Say for example, this is the package, already installed on the > system: > > # rpm -qa | grep lfc-libs > lfc-libs-1.8.0-1sec.sl5 > lfc-libs-1.8.0-1sec.sl5 > > and I want a symbolic: "liblfc.so -> libdpm.so.1.8.0" in "/opt/lfc/ > lib",

[Puppet Users] Re: What to do if something is not required on the clients?

2011-04-20 Thread Sans
Thanks John and others. For my case, I definitely know I don't need "httpd" and any packages (or updates) that depend on httpd, so "ensure => purged" should work for me, in this particular occasion. However, I also tried this (I posted this before in this thread abut can't see that anymore): pac

[Puppet Users] how to fix symbolic links

2011-04-20 Thread Sans
Dear all, Say for example, this is the package, already installed on the system: # rpm -qa | grep lfc-libs lfc-libs-1.8.0-1sec.sl5 lfc-libs-1.8.0-1sec.sl5 and I want a symbolic: "liblfc.so -> libdpm.so.1.8.0" in "/opt/lfc/ lib", for example. Is it possible? Cheers!! -- You received this mess

Re: [Puppet Users] "Listing" the keys in a hash as an array

2011-04-20 Thread Nigel Kersten
On Wed, Apr 20, 2011 at 12:17 AM, Felix Frank wrote: >> module Puppet::Parser::Functions >>   newfunction(:hash_keys, :type => :rvalue) do |args| >>     unless args[0].is_a?(Hash) >>       Puppet.warning "hash_keys takes one argument, the input hash" >>       nil >>     else >>       args[0].keys

[Puppet Users] Re: What to do if something is not required on the clients?

2011-04-20 Thread jcbollinger
On Apr 19, 4:37 pm, Sans wrote: > On Apr 19, 2:48 pm, jcbollinger wrote: > > > > If I understand you correctly, how do one know about the packages that > > > depend on a certain package? > > > Well that's part of a deeper problem, isn't it?  If you don't know > > what packages you might end up

[Puppet Users] Re: What to do if something is not required on the clients?

2011-04-20 Thread jcbollinger
On Apr 19, 10:04 am, Nan Liu wrote: > On Tue, Apr 19, 2011 at 7:46 AM, jcbollinger wrote [...] > > Oddly enough, I found bug 1739, closed on 0.24.x, that makes exactly > > the change from "rpm -e" to "yum -y remove".  That would make the yum > > provider work like the apt provider.  I didn't

Re: [Puppet Users] ERB strangness, or ruby/puppet internals I don't understand

2011-04-20 Thread Thomas Bellman
On 2011-04-15 21:10, Clay Caviness wrote: > Let's say I have a very simple template > template.erb: > <% if not has_variable?("foobar") then foobar = "undefined" end -%> > foobar: <%= foobar %> > class: <%= foobar.class %> > > And a basic manifest: > template.pp: > $mytemp = template('template.er

Re: [Puppet Users] "Listing" the keys in a hash as an array

2011-04-20 Thread Thomas Bellman
On 2011-04-20 03:28, Miki Shapiro wrote: > As suggested by Felix: > Manifest says: > $keys = split(",", inline_template("<%= netifcfg.keys.join(',') > %>")) > exec { "/bin/echo keys are $keys and netifcfg is $netifcfg": > logoutput => true } > > Output says: > notice: /Stage[mai

Re: [Puppet Users] Certificate Issues.... again

2011-04-20 Thread Thomas Bellman
On 2011-04-18 05:48, James Turnbull wrote: > Lance Reed wrote: >> Not sure if the book has been closed on this, but I had this problem >> recently on new installs. >> The problem was fixed by keeping the hosts in time sync. They were 5 >> hours out of sync. >> Not sure why this caused an issue u

RE: [Puppet Users] is it possible to take definition parameters from a database?

2011-04-20 Thread Russell Howe
> -Original Message- > From: puppet-users@googlegroups.com > [mailto:puppet-users@googlegroups.com] On Behalf Of rowan holmes > Sent: 19 April 2011 22:22 > To: Puppet Users > Subject: [Puppet Users] is it possible to take definition > parameters from a database? > > There may be thousand

Re: [Puppet Users] Logging configuration

2011-04-20 Thread Billy The Chip
On Tue, Apr 19, 2011 at 6:30 AM, Ben Hughes wrote: > On Mon, Apr 18, 2011 at 09:16:13AM -0700, Kal McFate wrote: > > > How do I tell puppet to log somewhere other than /var/log/messages. None > of > > the logging configuration options seem to do anything any more. > Specifically > > puppetdlog. >

Re: [Puppet Users] svn update on puppetmaster via commit hook on another server

2011-04-20 Thread Felix Frank
On 04/20/2011 09:55 AM, Andreas Paul wrote: > Do you suggest calling that rsync in the post commit hook? > That is not possible as the svn hook script is run by a httpd user > without any permissions and granting him any permission just for that > hook script would be hard to justify. Hi, doesn't

Re: [Puppet Users] svn update on puppetmaster via commit hook on another server

2011-04-20 Thread Andreas Paul
Do you suggest calling that rsync in the post commit hook? That is not possible as the svn hook script is run by a httpd user without any permissions and granting him any permission just for that hook script would be hard to justify. -- You received this message because you are subscribed to th

[Puppet Users] Re: svn update on puppetmaster via commit hook on another server

2011-04-20 Thread Andreas Paul
That would, in the worst case, delay the visibility of the changes for 5 minutes. Even running that cronjob every minute would dictate the admin to wait 1 minute before kicking the puppet clients. Otherwise we can't be sure if the client would use the latest config. -- You received this messag

Re: [Puppet Users] does puppet allow to a client specify a value in a configuration file?

2011-04-20 Thread Felix Frank
On 04/19/2011 11:34 PM, rowan holmes wrote: > hi everybody, > > In the server side we define a template for a configuration file. Our > client pulls configuration file from the server without knowing any > template is used or not, it just takes the catalog and puts the > changes to the file. Howev

Re: [Puppet Users] "Listing" the keys in a hash as an array

2011-04-20 Thread Felix Frank
> module Puppet::Parser::Functions > newfunction(:hash_keys, :type => :rvalue) do |args| > unless args[0].is_a?(Hash) > Puppet.warning "hash_keys takes one argument, the input hash" > nil > else > args[0].keys > end > end > end > > > save to lib/puppet/parser/fun

Re: [Puppet Users] is there a definition of the abstract service type

2011-04-20 Thread Felix Frank
On 04/20/2011 03:17 AM, Ben Hughes wrote: > On Tue, Apr 19, 2011 at 04:24:18AM -0700, Tim Coote wrote: > >> Is there a canonical definition of the service type abstraction, or is >> the definition just how the implementation behaves? > > What happens when you do: > > $ puppet resource service xi

Re: [Puppet Users] Re: Installing port on FreeBSD

2011-04-20 Thread Felix Frank
On 04/19/2011 11:52 PM, fafaforza wrote: > One last somewhat unrelated question, but one that might help someone > with a similar setup: > > How do I ensure that nss_ldap is installed only after 'sudo', as > otherwise, installing nss_ldap from ports would trigger the openldap > and sudo packages,

Re: [Puppet Users] How do you implement "revert changes'

2011-04-20 Thread Felix Frank
On 04/19/2011 08:55 PM, Mohamed Lrhazi wrote: > Thanks Felix But how is Filebucket currently used? Is there a > "puppet agent --restore" functionality that I missed? No, as a matter of fact, you missed the whole "filebucket" binary ;-) What I do interactively a lot is filebucket -l get and

Re: [Puppet Users] svn update on puppetmaster via commit hook on another server

2011-04-20 Thread Felix Frank
> The puppetlabs wiki page uses a simple svn update /etc/puppet in the > post-commit hook script, but that implies that the SVN server is on the > same machine as the puppetmaster, which is not the case in my environment. Hi, you could fall back to something less elegant like "svn update + rsync