Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-03 Thread Alan Barrett
On Wed, 03 Nov 2010, Robert Scheer wrote: > > In version 0.25, you can say > > > > $server = inline_template("<%= Puppet.settings[:server] %>"). > > Thanks! Puppet.settings[:server] is exactly what I was looking for. I had > tried variations of server, puppet.server and search(), but failed. Do

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-03 Thread Nigel Kersten
On Wed, Nov 3, 2010 at 7:32 AM, Robert Scheer wrote: > On Tue, Nov 02, 2010 at 09:21 -0700, Patrick wrote: > >> Actually, I seem to have it backwards.  Looks like $servername is the >> server-side config variable which is why you can't find it.  Alan Barrett >> seems to have a solution for getti

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-03 Thread Robert Scheer
On Tue, Nov 02, 2010 at 14:03 +0200, Alan Barrett wrote: > In version 0.25, you can say > > $server = inline_template("<%= Puppet.settings[:server] %>"). Thanks! Puppet.settings[:server] is exactly what I was looking for. I had tried variations of server, puppet.server and search(), but failed

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-03 Thread Robert Scheer
On Tue, Nov 02, 2010 at 09:21 -0700, Patrick wrote: > Actually, I seem to have it backwards. Looks like $servername is the > server-side config variable which is why you can't find it. Alan Barrett > seems to have a solution for getting the client side config. On the other > hand, if your DN

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-02 Thread Patrick
On Nov 2, 2010, at 9:09 AM, Robert Scheer wrote: > On Mon, Nov 01, 2010 at 13:07 -0700, Patrick wrote: > >> This isn't a very good answer, but the variable "$servername" contains the >> name of the server the client think's it's connecting to. That may do what >> you want. > > This is a very

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-02 Thread Robert Scheer
On Tue, Nov 02, 2010 at 10:24 +0100, Felix Frank wrote: > Sounds to me as though you had finally found a use for the generate > function, e.g. $master_host = generate("dnsdomainname -f"). > > http://docs.puppetlabs.com/references/stable/function.html#generate > > ;-) Just kidding, it's a useful

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-02 Thread Robert Scheer
On Mon, Nov 01, 2010 at 13:07 -0700, Patrick wrote: > This isn't a very good answer, but the variable "$servername" contains the > name of the server the client think's it's connecting to. That may do what > you want. This is a very good answer! Thank you. Where in the documentation did you fi

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-02 Thread Alan Barrett
On Mon, 01 Nov 2010, Robert Scheer wrote: > Is there a way to access the local configuration parameter 'server' > within puppet? Or is there another, better solution I am missing? See issue 2807 . In puppet-2.6, you can say $server = $settings::server

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-02 Thread Felix Frank
On 11/01/2010 06:51 PM, Robert Scheer wrote: > ... > I could solve that by making a custom fact, but besides the huge overhead > of "puppetd --configprint server" running every 30 minutes on every node, > it is just weird for a server to have to ask the client for its own name. > > So I'd really l

Re: [Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-01 Thread Patrick
On Nov 1, 2010, at 10:51 AM, Robert Scheer wrote: > Hi, > > I have set up a puppetmaster test server where I can test new releases > of puppet before upgrading our puppetmaster production server. > It works, but there is one issue I'd like to solve: > > The puppet.conf for all nodes (except the

[Puppet Users] Does puppetmaster knows its own configuration parameters?

2010-11-01 Thread Robert Scheer
Hi, I have set up a puppetmaster test server where I can test new releases of puppet before upgrading our puppetmaster production server. It works, but there is one issue I'd like to solve: The puppet.conf for all nodes (except the puppetmasters) is managed by puppet (in modules/puppet/files/pupp