[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Evan Hisey

On Thu, Jun 25, 2009 at 4:36 PM, Neil K wrote:
>
> Thank you for your replies. As I said I am pretty new to this puppet
> language. Could any one please point how to do a sample package
> install which includes a ./configure, make, make install inside a
> package directory?
>
> Thanks again for our helps.
>
Wrong place to do this, you do not use puppet to create a package. you
sue puppet to install the package. The distribution you are using will
dictate how to create packages. The ./configure, make, make install
plus anything else needed for your particular package format would be
done by you to create the application package.  The package would then
be setup in a local repository and now puppet uses the appropraite
package manager to install you custom package.

what distribution are you using?

Evan

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Bryan Kearney

Bjørn Dyresen wrote:
> On Jun 25, 2009, at 10:42 PM, Neil K wrote:
> 
>> Hi all,
>>
>> I am pretty new to Puppet. My puppet master server is a RHEL 5 box and
>> puppet client is a CentOS 5.3 vm. I have managed to configure puppet
>> server to successfully install.and upgrade rpm based packages on the
>> client machine. Is it possible to install noon-rpm based packages
>> using puppet? Like packages comes as tar.gz such as web based
>> applications?
>>
>>
> 
> It is possible to do anything with puppet through the exec type.  
> However if  you are expecting a lot of these cases I recommend  
> building the packages and use your distributions package manager  
> instead. This is much cleaner and a more maintainable way of doing it.
> 

I had to hack a single_exec type.. it drops a touch file after it runs a 
script. It is nasty, but if the script is not idempotent.. it works.

-- bk

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Bryan Kearney

Neil K wrote:
> Hi all,
> 
> I am pretty new to Puppet. My puppet master server is a RHEL 5 box and
> puppet client is a CentOS 5.3 vm. I have managed to configure puppet
> server to successfully install.and upgrade rpm based packages on the
> client machine. Is it possible to install noon-rpm based packages
> using puppet? Like packages comes as tar.gz such as web based
> applications?
> 
> If it is possible, please provide any example manifests or any good
> documents that I can follow.
> 

Yes.. it is possible. Depending on the scripts that are required to 
install the package, there are some hacks you may need to do. There are 
some examples of scripts here:

http://www.thincrust.org/help.html

They are tailored for running puppet stand alone to build appliances.. 
so YMMV... but it proves it can be done :)

-- bk

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Problems running on Mac OS X

2009-06-25 Thread Nigel Kersten

On Thu, Jun 25, 2009 at 5:18 PM, Allan Marcus wrote:
>
> ruby -I /usr/lib/ruby/site_ruby/1.8 puppetd
>
> works! Now why would that work? Do I need to set RUBYLIB when using
> the installer packages?

Are you sure you're not doing something weird with your Ruby install?

On Leopard, do you have the default symlinks still?

/usr/lib/ruby ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby

/usr/lib/ruby/site_ruby ->
../../../../../../../../../../Library/Ruby/Site

There are packages out there that incorrectly fail to follow symlinks
for these directories, and break Ruby in lots of ways under Leopard.
Older bundled packages of RubyCocoa are a prime culprit.





>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
> On Jun 25, 2009, at 5:59 PM, Allan Marcus wrote:
>
>>
>>
>> On Jun 25, 2009, at 5:43 PM, Nigel Kersten wrote:
>>
>>>
>>> On Thu, Jun 25, 2009 at 3:03 PM, Allan Marcus wrote:

 Actually, I tried it on a fresh Tiger build and I get the same
 results :-(
>>>
>>> You're definitely running /usr/bin/puppetd and /usr/bin/facter ?
>>
>> Yes. confirmed with 'which'
>>
>>>
>>>
>>> Do /usr/lib/ruby/site_ruby/1.8/{facter,puppet} exist ?
>>
>> yes
>>
>>
>> this is on a freshly installed updated leopard machine. Install
>> leopard. Run SW Update. Install factor. install puppet. run puppet.
>> fail :-(
>>
>> I did notice the installer for factor is for 1.5.4, which I don't
>> think is the current version. Is there a more recent Mac installer for
>> factor? Could this be the issue? I got the installers from
>>
>> https://sites.google.com/a/explanatorygap.net/puppet/
>>
>>
>>
>>> I just installed them on a fresh Tiger install the other day with no
>>> problems
>>>
>>>
>>>

 Any ideas?

 ---
 Thanks,

 Allan Marcus
 505-667-5666



 On Jun 25, 2009, at 3:54 PM, Allan Marcus wrote:

>
> hello,
>
> I installed facter and puppet from MacPorts and they seemed to work
> just fine. Since I will be deploying from the packages at
>
> So, I uninstalled from MacPorts and installed from the packages.
> If I
> try to run facter or puppetd I get errors. Any ideas?
>
> bash-3.2# facter
> /usr/bin/facter:50:in `require': no such file to load -- facter
> (LoadError)
>      from /usr/bin/facter:50
>
> bash-3.2# puppetd
> /usr/bin/puppetd:164:in `require': no such file to load -- puppet
> (LoadError)
>      from /usr/bin/puppetd:164
>
>
>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
>
>>


>

>>>
>>>
>>>
>>> --
>>> Nigel Kersten
>>> nig...@google.com
>>> System Administrator
>>> Google, Inc.
>>>

>>
>>
>> >
>
>
> >
>



-- 
Nigel Kersten
nig...@google.com
System Administrator
Google, Inc.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Problems running on Mac OS X

2009-06-25 Thread Allan Marcus

ruby -I /usr/lib/ruby/site_ruby/1.8 puppetd

works! Now why would that work? Do I need to set RUBYLIB when using  
the installer packages?

---
Thanks,

Allan Marcus
505-667-5666



On Jun 25, 2009, at 5:59 PM, Allan Marcus wrote:

>
>
> On Jun 25, 2009, at 5:43 PM, Nigel Kersten wrote:
>
>>
>> On Thu, Jun 25, 2009 at 3:03 PM, Allan Marcus wrote:
>>>
>>> Actually, I tried it on a fresh Tiger build and I get the same
>>> results :-(
>>
>> You're definitely running /usr/bin/puppetd and /usr/bin/facter ?
>
> Yes. confirmed with 'which'
>
>>
>>
>> Do /usr/lib/ruby/site_ruby/1.8/{facter,puppet} exist ?
>
> yes
>
>
> this is on a freshly installed updated leopard machine. Install
> leopard. Run SW Update. Install factor. install puppet. run puppet.
> fail :-(
>
> I did notice the installer for factor is for 1.5.4, which I don't
> think is the current version. Is there a more recent Mac installer for
> factor? Could this be the issue? I got the installers from
>
> https://sites.google.com/a/explanatorygap.net/puppet/
>
>
>
>> I just installed them on a fresh Tiger install the other day with no
>> problems
>>
>>
>>
>>>
>>> Any ideas?
>>>
>>> ---
>>> Thanks,
>>>
>>> Allan Marcus
>>> 505-667-5666
>>>
>>>
>>>
>>> On Jun 25, 2009, at 3:54 PM, Allan Marcus wrote:
>>>

 hello,

 I installed facter and puppet from MacPorts and they seemed to work
 just fine. Since I will be deploying from the packages at

 So, I uninstalled from MacPorts and installed from the packages.
 If I
 try to run facter or puppetd I get errors. Any ideas?

 bash-3.2# facter
 /usr/bin/facter:50:in `require': no such file to load -- facter
 (LoadError)
  from /usr/bin/facter:50

 bash-3.2# puppetd
 /usr/bin/puppetd:164:in `require': no such file to load -- puppet
 (LoadError)
  from /usr/bin/puppetd:164



 ---
 Thanks,

 Allan Marcus
 505-667-5666




>
>>>
>>>

>>>
>>
>>
>>
>> -- 
>> Nigel Kersten
>> nig...@google.com
>> System Administrator
>> Google, Inc.
>>
>>>
>
>
> >


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Problems running on Mac OS X

2009-06-25 Thread Allan Marcus


On Jun 25, 2009, at 5:43 PM, Nigel Kersten wrote:

>
> On Thu, Jun 25, 2009 at 3:03 PM, Allan Marcus wrote:
>>
>> Actually, I tried it on a fresh Tiger build and I get the same
>> results :-(
>
> You're definitely running /usr/bin/puppetd and /usr/bin/facter ?

Yes. confirmed with 'which'

>
>
> Do /usr/lib/ruby/site_ruby/1.8/{facter,puppet} exist ?

yes


this is on a freshly installed updated leopard machine. Install  
leopard. Run SW Update. Install factor. install puppet. run puppet.  
fail :-(

I did notice the installer for factor is for 1.5.4, which I don't  
think is the current version. Is there a more recent Mac installer for  
factor? Could this be the issue? I got the installers from

https://sites.google.com/a/explanatorygap.net/puppet/



> I just installed them on a fresh Tiger install the other day with no
> problems
>
>
>
>>
>> Any ideas?
>>
>> ---
>> Thanks,
>>
>> Allan Marcus
>> 505-667-5666
>>
>>
>>
>> On Jun 25, 2009, at 3:54 PM, Allan Marcus wrote:
>>
>>>
>>> hello,
>>>
>>> I installed facter and puppet from MacPorts and they seemed to work
>>> just fine. Since I will be deploying from the packages at
>>>
>>> So, I uninstalled from MacPorts and installed from the packages.  
>>> If I
>>> try to run facter or puppetd I get errors. Any ideas?
>>>
>>> bash-3.2# facter
>>> /usr/bin/facter:50:in `require': no such file to load -- facter
>>> (LoadError)
>>>   from /usr/bin/facter:50
>>>
>>> bash-3.2# puppetd
>>> /usr/bin/puppetd:164:in `require': no such file to load -- puppet
>>> (LoadError)
>>>   from /usr/bin/puppetd:164
>>>
>>>
>>>
>>> ---
>>> Thanks,
>>>
>>> Allan Marcus
>>> 505-667-5666
>>>
>>>
>>>
>>>

>>
>>
>>>
>>
>
>
>
> -- 
> Nigel Kersten
> nig...@google.com
> System Administrator
> Google, Inc.
>
> >


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Problems running on Mac OS X

2009-06-25 Thread Nigel Kersten

On Thu, Jun 25, 2009 at 3:03 PM, Allan Marcus wrote:
>
> Actually, I tried it on a fresh Tiger build and I get the same
> results :-(

You're definitely running /usr/bin/puppetd and /usr/bin/facter ?

Do /usr/lib/ruby/site_ruby/1.8/{facter,puppet} exist ?

I just installed them on a fresh Tiger install the other day with no
problems



>
> Any ideas?
>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
> On Jun 25, 2009, at 3:54 PM, Allan Marcus wrote:
>
>>
>> hello,
>>
>> I installed facter and puppet from MacPorts and they seemed to work
>> just fine. Since I will be deploying from the packages at
>>
>> So, I uninstalled from MacPorts and installed from the packages. If I
>> try to run facter or puppetd I get errors. Any ideas?
>>
>> bash-3.2# facter
>> /usr/bin/facter:50:in `require': no such file to load -- facter
>> (LoadError)
>>       from /usr/bin/facter:50
>>
>> bash-3.2# puppetd
>> /usr/bin/puppetd:164:in `require': no such file to load -- puppet
>> (LoadError)
>>       from /usr/bin/puppetd:164
>>
>>
>>
>> ---
>> Thanks,
>>
>> Allan Marcus
>> 505-667-5666
>>
>>
>>
>>
>> >
>
>
> >
>



-- 
Nigel Kersten
nig...@google.com
System Administrator
Google, Inc.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Neil K

Thanks a bunch, Swati. Your notes were extremely useful. I will check
on the exec type and will collect more info.
Once again thanks for everyone who tried to help.

Regards,
Neil
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Problems running on Mac OS X

2009-06-25 Thread Allan Marcus

hello,

I installed facter and puppet from MacPorts and they seemed to work  
just fine. Since I will be deploying from the packages at

So, I uninstalled from MacPorts and installed from the packages. If I  
try to run facter or puppetd I get errors. Any ideas?

bash-3.2# facter
/usr/bin/facter:50:in `require': no such file to load -- facter  
(LoadError)
from /usr/bin/facter:50

bash-3.2# puppetd
/usr/bin/puppetd:164:in `require': no such file to load -- puppet  
(LoadError)
from /usr/bin/puppetd:164



---
Thanks,

Allan Marcus
505-667-5666




--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Problems running on Mac OS X

2009-06-25 Thread Allan Marcus

Actually, I tried it on a fresh Tiger build and I get the same  
results :-(

Any ideas?

---
Thanks,

Allan Marcus
505-667-5666



On Jun 25, 2009, at 3:54 PM, Allan Marcus wrote:

>
> hello,
>
> I installed facter and puppet from MacPorts and they seemed to work
> just fine. Since I will be deploying from the packages at
>
> So, I uninstalled from MacPorts and installed from the packages. If I
> try to run facter or puppetd I get errors. Any ideas?
>
> bash-3.2# facter
> /usr/bin/facter:50:in `require': no such file to load -- facter
> (LoadError)
>   from /usr/bin/facter:50
>
> bash-3.2# puppetd
> /usr/bin/puppetd:164:in `require': no such file to load -- puppet
> (LoadError)
>   from /usr/bin/puppetd:164
>
>
>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
>
> >


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Swati Tiwari
Hi,

I am new to puppet as well, but I could tell you how to do a similar
install.

exec { "getthesource":
  command => "wget http://thesourceurl";,
  cwd => "/the/directory/to/issue/this/command/from"
}

exec { "untarthesource":
   command => "the_untar_command",
   cwd => "the/directory/to/issue/this/command/from",
   require => Exec["getthesource"]
 }

exec { "./configure":
  command => "the/directory/to/issue/this/command/from/configure",
  cwd => "as above",
  require => Exec["untarthesource"]
}

And the other steps follow in a similar manner.. You should probably check
the exec resource type in the type reference.
.

But, I think this is not the most elegant way of doing it... There is the
package resource type in puppet which can be used to install packages from
binaries, but yes, I haven't found another way to install from source.

2009/6/25 Neil K 

>
> Thank you for your replies. As I said I am pretty new to this puppet
> language. Could any one please point how to do a sample package
> install which includes a ./configure, make, make install inside a
> package directory?
>
> Thanks again for our helps.
>
> Regards,
> Neil
> >
>


-- 
Regards,
Swati

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Neil K

Thank you for your replies. As I said I am pretty new to this puppet
language. Could any one please point how to do a sample package
install which includes a ./configure, make, make install inside a
package directory?

Thanks again for our helps.

Regards,
Neil
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Bjørn Dyresen

On Jun 25, 2009, at 10:42 PM, Neil K wrote:

>
> Hi all,
>
> I am pretty new to Puppet. My puppet master server is a RHEL 5 box and
> puppet client is a CentOS 5.3 vm. I have managed to configure puppet
> server to successfully install.and upgrade rpm based packages on the
> client machine. Is it possible to install noon-rpm based packages
> using puppet? Like packages comes as tar.gz such as web based
> applications?
>
>

It is possible to do anything with puppet through the exec type.  
However if  you are expecting a lot of these cases I recommend  
building the packages and use your distributions package manager  
instead. This is much cleaner and a more maintainable way of doing it.

Regards



--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Joe McDonagh

Neil K wrote:
> Hi all,
>
> I am pretty new to Puppet. My puppet master server is a RHEL 5 box and
> puppet client is a CentOS 5.3 vm. I have managed to configure puppet
> server to successfully install.and upgrade rpm based packages on the
> client machine. Is it possible to install noon-rpm based packages
> using puppet? Like packages comes as tar.gz such as web based
> applications?
>
> If it is possible, please provide any example manifests or any good
> documents that I can follow.
>
> Thanks,
> Neil
>
> >
>   
Hi Neil, you want to check out the 'define' keyword in the puppet 
language doc. This way you can have a definition like "my_pkg" pass it 
some options, and all the magic to set it up can be done inside the 
define. I don't currently have an example because I package most of my 
stuff in .debs and put it in a custom repo.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Installing applications using puppet

2009-06-25 Thread Neil K

Hi all,

I am pretty new to Puppet. My puppet master server is a RHEL 5 box and
puppet client is a CentOS 5.3 vm. I have managed to configure puppet
server to successfully install.and upgrade rpm based packages on the
client machine. Is it possible to install noon-rpm based packages
using puppet? Like packages comes as tar.gz such as web based
applications?

If it is possible, please provide any example manifests or any good
documents that I can follow.

Thanks,
Neil

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Ensure overriden service after exec has run

2009-06-25 Thread Mike Lancaster

Hi,
How do I force my Service declaration (with is defined elsewhere and
inherited) is run after an exec has run?

The code;
class autofs_nis::services inherits services::base {
Service['ypbind'] {
ensure => running,
enable=> true,
}
.
}

class autofs_nis::exec inherits services::base {
exec { "setdomainname":
command => "domainname blanked",
path => "/bin",
unless => "[[ $(domainname) == \"blanked\" ]]",
}
}

Open to suggestions to do this differently.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: basic question

2009-06-25 Thread David Bishop

Through the help of Don and Evan, I've figured this out.  My solution is
as follows:

nodes.pp:
import "modules"
import groups/*

node 'admin01.dev.example.com' {
$webserver = "role"
include admin
}

groups/admin.pp:

class admin {
include example
}

modules/examples/manifests/init.pp:

class example {
if $webserver{
$webserver = true
} else {
$webserver = false
}
file { "example_file":
path  => "/tmp/example.file",
owner => "root",
group => "root",
mode  => 644,
content => template("example.erb"),
}
}

templates/example.erb:
All machines get this text.
<% if webserver == true -%>
Then insert this text, too.
<% end -%>

Things to note: due to scoping rules, your node must *include*, not
inherit, the class that contains the module that has the template in it.
I.e., in my example, if admin01 inherited the dev class, this does not
work.  Presumably, somebody, I'll understand the scoping rules enough to
know why that is.  Today... is not that day.

Also, the $webserver variable *must* be set before "include"ing the
class that contains the template.  Otherwise, see previous paragraph.

And yes, you could set the $webserver variable to whatever you wish, but
setting it to "role" helps keep things clear in my configs.  And no, I
don't understand why the example class can see that the $webserver
variable exists, but the template can't unless I re-set it.  See
two-paragraphs up.

Finally, you can set $webserver at the "group" (class) level, in - say -
groups/admin.pp, as long as you follow the "set the variable first"
rule.  In this case, you would remove that line from the node
definition, and change admin.pp to the following:

class admin {
$webserver = "role"
include example
}

Hope that helps somebody else.

David Bishop

P.S. Keyword dump, to help searchers in the future hit this post:
tagging, special case, inheritance, override configuration, 
hierarchies, how do I make this stupid thing work? 

On Tue, Jun 23, 2009 at 01:56:44PM -0600, David Bishop wrote:
> I know I'm missing something very basic, but I've been beating my head
> on this for hours now without making progress.  I'm trying to 'tag'
> nodes with various values, to be pulled later in some home-grown
> modules.  For instance, I want to mark machines as being a webserver,
> and then in my yum repo module, I have a template that checks for
> webservers and adds a custom repo if true.  I'm very flexible in the 
> details - I don't care if it's a custom variable, a tag, a fact, 
> whatever.  The only thing I *don't* want to do is use inheritance and 
> groups to do this - any given machine will be tagged with various 
> different things, and trying to maintain groups would quickly become 
> unmanageable.  And unfortunately, this isn't something that can be
> discovered automatically using facter, at least as far as I can tell.
> 
> An example of a failed attempt would be (all files stripped down, but
> the meat is there):
> 
> nodes.pp:
> import "modules"
> import groups/*
> import roles/*
> 
> node 'admin01.dev.example.com' inherits admin { include webserver }
> 
> roles/webserver.pp:
> 
> class webserver {
>   $webserver = true
> }
> 
> templates/repo.erb:
> 
> The value of the variable is <%= $webserver::webserver %>.
> 
> 
> I also tried $::webserver (after moving it out of the class definition),
> $webserver, setting a tag in the class and then reading out the defined
> tags, and more.  But that should give you guys an idea of what I'm
> aiming to do.
> 
> Thanks for any pointers!
> 
> David




signature.asc
Description: Digital signature


[Puppet Users] Re: Performance of Passenger vs. Mongrel

2009-06-25 Thread Scott Smith

Mark Plaksin wrote:
> Howdy:
> 
> How does Passenger perform compared to Mongrel?  For us Passenger looks
> worse.  We have two puppetmasters; one does file serving, the other does
> everything else.  We just started running 0.25 beta2 on both.  The
> file-server is running RubyEE + Passenger and the non-file-server is
> running Mongrel.  When our heavy-hitter schedule runs the load average
> on our file server spikes much higher than it did when it was running
> 0.25 beta1 with Mongrel.
> 

Are you running the same # of mongrels as Passenger workers? What is 
your Passenger config? What are the specs of your app server?

-scott

-- 
sc...@ohlol.net

http://github.com/ohlol

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Ordered Installation

2009-06-25 Thread Swati Tiwari
I apologize for going off on a tangent like this and thanks for your
patience and advice.

2009/6/25 Mike Renfro 

>
> You've switched from asking about the native puppet package type on
> Debian to how to get puppet to how to get download and build Gems from
> source.
>
> What you propose in the last message is probably about as good a
> solution as I'd be able to come up with.
>
> --
> Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
> 931 372-3601 / Tennessee Technological University
>
> >
>


-- 
Regards,
Swati

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Ordered Installation

2009-06-25 Thread Mike Renfro

You've switched from asking about the native puppet package type on 
Debian to how to get puppet to how to get download and build Gems from 
source.

What you propose in the last message is probably about as good a 
solution as I'd be able to come up with.

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Performance of Passenger vs. Mongrel

2009-06-25 Thread Mark Plaksin

Howdy:

How does Passenger perform compared to Mongrel?  For us Passenger looks
worse.  We have two puppetmasters; one does file serving, the other does
everything else.  We just started running 0.25 beta2 on both.  The
file-server is running RubyEE + Passenger and the non-file-server is
running Mongrel.  When our heavy-hitter schedule runs the load average
on our file server spikes much higher than it did when it was running
0.25 beta1 with Mongrel.

We will try 0.25 beta2 + Mongrel on our file server to see if that makes
a difference but I'm curious what others have seen and what we should
expect.

Thanks!


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: LDAPNodes slow

2009-06-25 Thread S H
On Thu, Jun 25, 2009 at 11:33 AM, Rob McBroom wrote:

>
> On 2009-Jun-24, at 5:11 PM, S H wrote:
>
> > With that behind us, I've recently begun to play with the LDAPNodes
> > capabilities and found that the ruby/ldap library used is unbearably
> > slow.
>
> I haven't noticed any slowness, but I did see some errors from Puppet
> saying the node couldn't be found, while the corresponding log on the
> LDAP server shows the results being returned. I assume this is a bug
> in ruby-ldap and not Puppet (and I haven't seen it happen recently).
>
> > I've isolated it from Puppet itself by putting together a test
> > script using ruby/ldap that simply searches for a particular DN and
> > prints it out.
>
> If you want to send me this script, I can try it on one of my RHEL5 or
> Debian systems. This might help narrow down what the problem is.
>
> --
> Rob McBroom
> 


Thanks for the offer. I think I finally tracked this down to the virtual
environment I was testing in since I can't replicate it on my physical
hardware.

Sorry for the spam!

-Shawn

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] node cache and Passenger

2009-06-25 Thread Rob McBroom

I've started using Passenger and it seems to be working just fine, but  
I see this in the logs on the puppetmaster for what looks like every  
run on every node.

 Jun 25 13:02:53 puppet puppetmasterd[7825]: Expiring the node  
cache of client.foo.com
 Jun 25 13:02:53 puppet puppetmasterd[7825]: Not using expired  
node for client.foo.com from cache; expired at Thu Jun 25 13:01:53  
-0400 2009
 Jun 25 13:02:53 puppet puppetmasterd[7825]: Caching node for  
client.foo.com

Any ideas? Thanks.

-- 
Rob McBroom







--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: LDAPNodes slow

2009-06-25 Thread Rob McBroom

On 2009-Jun-24, at 5:11 PM, S H wrote:

> With that behind us, I've recently begun to play with the LDAPNodes  
> capabilities and found that the ruby/ldap library used is unbearably  
> slow.

I haven't noticed any slowness, but I did see some errors from Puppet  
saying the node couldn't be found, while the corresponding log on the  
LDAP server shows the results being returned. I assume this is a bug  
in ruby-ldap and not Puppet (and I haven't seen it happen recently).

> I've isolated it from Puppet itself by putting together a test  
> script using ruby/ldap that simply searches for a particular DN and  
> prints it out.

If you want to send me this script, I can try it on one of my RHEL5 or  
Debian systems. This might help narrow down what the problem is.

-- 
Rob McBroom



--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet + HAProxy

2009-06-25 Thread Scott Smith

Telmo wrote:
> Hello,
> 
> The Puppet footprint within my company is steadily growing, We took
> the basic steps to make it more robust (passenger + apache) but in
> order to meet the needs of a 24x7 shop I need redundancy. I've read
> the Reductive Labs WIKI about redundancy (http://reductivelabs.com/
> trac/puppet/wiki/Recipes/HighAvailability) but I was wondering if
> anyone has experiences (good or bad) using HAProxy to achieve HA on
> the puppetmaster side.
> 

I'd suggest simply putting HAProxy in front of your Apache servers and 
continuing to use the Passenger setup you've already implemented.

HAProxy is great. <3 Willy.

-scott

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet + HAProxy

2009-06-25 Thread Nigel Kersten

On Thu, Jun 25, 2009 at 6:01 AM, Telmo wrote:
>
> Hello,
>
> The Puppet footprint within my company is steadily growing, We took
> the basic steps to make it more robust (passenger + apache) but in
> order to meet the needs of a 24x7 shop I need redundancy. I've read
> the Reductive Labs WIKI about redundancy (http://reductivelabs.com/
> trac/puppet/wiki/Recipes/HighAvailability) but I was wondering if
> anyone has experiences (good or bad) using HAProxy to achieve HA on
> the puppetmaster side.

Are you using environments with 0.24.8? If you are, you can't
effectively do HA/load balancing across servers.

I do know a few people who have HAProxy Puppet setups who aren't
regularly posting on the list. I'll see if I can ping them to respond
to this thread.


>
> Thanks,
>
> Roberto.
> >
>



-- 
Nigel Kersten
nig...@google.com
System Administrator
Google, Inc.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Override configuration defined in inherited node?

2009-06-25 Thread Don

Sigh- typo'd again.

That should have read:

> class roles::ntpmaster {
>   include ntp::master
> }

-Don

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Override configuration defined in inherited node?

2009-06-25 Thread Don

> couple of nodes that need a different configuration. So what I need to do on
> these particular nodes are, as far as I know, one of these things:
> 1) Find a way to override the NTP configuration defined in the base node
> 2) Make sure they don't inherit the base node, so that I can define a
> different NTP configuration here
I literally just asked this same question and the solution is less
than stellar.

Node inheritance is useful for variables and overriding. Classes are
useful for specifying system roles.

In more concrete terms this is what I do:
class roles::general {
  include ntp
  include ldap
}

class roles::ntpserver {
  include ntp::master
}

node zone-global {
  ntp_servers = ['']
}

node zone-nyc inherits zone-global {
  $ntp_servers = ['10..1.1.10']
}

node client inherits zone-nyc {
  include roles::general
}

node ntpmaster inherits zonenyc {
  $ntp_servers = ['pool.ntp.org']

  include roles::general
  include roles::ntpmaster
}

This isn't nearly as clean as it could be if some of the variable and
scoping rules were different, but for now it has sufficed to clean up
my puppet config dramatically.

-Don
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] ~~~sexy hot girls sexy videos~~

2009-06-25 Thread udai

~~~sexy hot girls sexy videos~~

~~~nude sexy girls modern sex~~~

http://earning2online.com

http://earning2online.com

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Issues with clients connecting

2009-06-25 Thread Christian Hofstaedtler



On Jun 25, 10:54 am, Curt  Micol  wrote:
> I am working on moving to a new puppetmaster. Along with this move I
> am updating to Puppet 0.24.8.
>
> As it stands, my test client can't connect:
> notice: Starting Puppet client version 0.24.8
> debug: Loaded state in 0.00 seconds
> debug: Retrieved facts in 1.12 seconds
> debug: Retrieving catalog
> debug: Calling puppetmaster.getconfig
> err: Could not retrieve catalog: Could not find node
> 'vz200b.liquidweb.com'; cannot compile

It says it can't compile the catalog - this is _not_ a connection
problem. Can you test without external nodes first?

Christian

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet + HAProxy

2009-06-25 Thread Telmo

Hello,

The Puppet footprint within my company is steadily growing, We took
the basic steps to make it more robust (passenger + apache) but in
order to meet the needs of a 24x7 shop I need redundancy. I've read
the Reductive Labs WIKI about redundancy (http://reductivelabs.com/
trac/puppet/wiki/Recipes/HighAvailability) but I was wondering if
anyone has experiences (good or bad) using HAProxy to achieve HA on
the puppetmaster side.

Thanks,

Roberto.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Override configuration defined in inherited node?

2009-06-25 Thread Evan Hisey

On Thu, Jun 25, 2009 at 1:12 AM, Kenneth Holter wrote:
> Hi all.
>
>
> I'm running puppet 0.24.4, and have the following issue: I have a base node
> which more or less every linux server inherits. In the base node I've
> defined a default NTP client configuration, but now I've come across a
> couple of nodes that need a different configuration. So what I need to do on
> these particular nodes are, as far as I know, one of these things:
> 1) Find a way to override the NTP configuration defined in the base node
> 2) Make sure they don't inherit the base node, so that I can define a
> different NTP configuration here
>
> So is there a way to override a configration defined in the base node (i.e.
> the inherited node)?
>
>
One thing might be to change the inherit to an include on the nodes
that need special stuff. That way you can use variables to override
default setting in the ntp module. There is an ongoing thread on this
right now "Server Hierarchies and other configuration questions"

Evan

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Server Hierarchies Part Two (Puppet's Revenge)

2009-06-25 Thread Don

> In James Turnbull's book there's a good discussion on the variable
> scoping issue (excellent book btw, a must have).  He offered a
I have it, and while a good book, I don't think my problems are with
understanding the issues- I just want puppet to do things it can't.

> $ntp_servers = ['ntp01.example.com',
>   'ntp02.example.com']
>
> class zones::global {
>   $ntp_acls = ['']
>   include ntp
> }
See- now you're defining a role (ntp) and settings ($ntp_acls) for
that role all in the same place. I wanted to use zones to define
various settings and then just keep overriding them. If I include
classes then the scoping rules prevent the variables in my zone class
from being seen by my role class so that doesn't work either.

What I've started doing is to use inheritance to build a variable
tree:

node global {
  ntp_servers = ['']
}

node zonenyc inherits global {
  $ntp_servers = ['10..1.1.10']
}

node client inherits zonenyc {
  include roles::general
}

node ntpmaster inherits zonenyc {
  $ntp_servers = ['pool.ntp.org']

  include roles::general
  include roles::ntpmaster
}

It's not nearly as clean as I would like, but at least I can override
variables and accomplish most of what I want to do.

-Don
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Server Hierarchies Part Two (Puppet's Revenge)

2009-06-25 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

iuhh wrote:
> In James Turnbull's book there's a good discussion on the variable
> scoping issue (excellent book btw, a must have).  He offered a
> workaround by defining the variable you want to override outside the
> class scopes.  So you could try
> 

Thanks! :)

There's also some discussion at:

http://reductivelabs.com/trac/puppet/wiki/CommonMisconceptions

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration
(http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet
(http://tinyurl.com/pupbook)
* Pro Nagios 2.0
(http://tinyurl.com/pronagios)
* Hardening Linux
(http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKQ0eD9hTGvAxC30ARAi2dAJ9Jim7CIkumaRjVk2eAUIJGFrdaQQCfXLoF
EIavzehdYq7l26DfvqepdGE=
=RkBh
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Server Hierarchies Part Two (Puppet's Revenge)

2009-06-25 Thread iuhh

In James Turnbull's book there's a good discussion on the variable
scoping issue (excellent book btw, a must have).  He offered a
workaround by defining the variable you want to override outside the
class scopes.  So you could try

$ntp_servers = ['ntp01.example.com',
  'ntp02.example.com']

class zones::global {
  $ntp_acls = ['']
  include ntp
}

class zones::nyc {
  $ntp_servers = ['ntp01.othersite.com',
  'ntp02.othersite.com']
  include zones::global
}

node host1.example.com {
  include zones::nylrc
}


On Jun 23, 7:32 pm, Don  wrote:
> > Wow, how did I miss that? That may very well solve a bunch of my
> > problems- it's not as transparent as I would prefer (you can't see at
> > a glance what resources a node references) but it has got to be better
> > than what I'm dealing with now. Thanks for the feedback.
>
> Nope spoke too soon. Scoping screws this up.
>
> For example:
> class zones::global {
>   $ntp_servers = ['ntp01.example.com',
>                           'ntp02.example.com']
>   $ntp_acls = ['']
>   include ntp
>
> }
>
> class zones::nyc {
>   $ntp_servers = ['ntp01.othersite.com',
>                           'ntp02.othersite.com']
>
>   include zones::global
>
> }
>
> node host1.example.com {
>   include zones::nylrc
>
> }
>
> The variables in global are available to NYC but the variables I have
> overridden in NYC are not available to global. In the end,
> host1.example.com ends up with ntp01.example.com as it's NTP server
> instead of ntp01.othersite.com because of scoping.
>
> Am I crazy for thinking this sort of hierarchical structure would be
> amazingly useful and is basically impossible with puppet?
>
> Is there some reason I am missing that would make the above a terrible
> idea?
>
> Without the above sort of hierarchy I'm going to end up with a jumble
> of logic statements and node descriptions that could otherwise be made
> incredibly simple.
>
> What am I missing?
>
> -Don
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Issues with clients connecting

2009-06-25 Thread Curt Micol

Hello,

I am working on moving to a new puppetmaster. Along with this move I
am updating to Puppet 0.24.8.

As it stands, my test client can't connect:
notice: Starting Puppet client version 0.24.8
debug: Loaded state in 0.00 seconds
debug: Retrieved facts in 1.12 seconds
debug: Retrieving catalog
debug: Calling puppetmaster.getconfig
err: Could not retrieve catalog: Could not find node
'vz200b.liquidweb.com'; cannot compile

On my puppetmaster we are using an external_nodes.py script:
### Imports
import sys
import re
import time
import yaml

### Constants
# puppet user must have read acces to this
NODEFILE = '/etc/puppet/nodes.yaml'
# puppet user must have write access to this
LOGFILE = '/var/log/puppet/nodes.log'

### Arguments
hostname = sys.argv[1]

### Functions

# Open NODESFILE and load the two documents into structures, return as
tuple
def parse_nodefile():
f = file(NODEFILE, 'r')
docs = yaml.load_all(f.read())
f.close()
return (docs.next(), docs.next())

# Write a msg to LOGFILE
def log(msg):
f = file(LOGFILE, 'a')
timestamp = time.strftime('%Y%m%d-%H:%M')
f.write(timestamp + ' - ' + msg + '\n')
f.close()

### Action!

(regexes, modules) = parse_nodefile()

for nodetype, regexlist in regexes.iteritems():
for regex in regexlist:
p = re.compile(regex)
m = p.match(hostname)
if m:
found_nodetype = nodetype

modulelist = modules['default']

try:
if found_nodetype and modules[found_nodetype] is not None:
modulelist.extend(modules[found_nodetype])
except NameError:
log(hostname + ' doesn\'t match a defined node type')
sys.exit(1)

yamldoc = {'classes': modulelist}
print yaml.dump(yamldoc, explicit_start=True,
default_flow_style=False)

# Puppet expects a return code of 0 to signal to indicate success
# and non-zero for error or a non-regcognized hostname
sys.exit(0)

Which does work how I would expect:
[r...@vpsadmins ~]# python /etc/puppet/tools/external_nodes.py
vz200b.liquidweb.com
---
classes:
- custom
- monitoring::base
- ntpd
- puppetd
- rpms
- sshd
- yum
- crontab
- iptables
- ldap::client
- monitoring::vps
- sudo
- virtuozzo
- vpsscripts

I am using a Passenger configuration on the Puppetmaster, here's the
debug output when I attempt to connect from the client:

Jun 25 04:39:05 vpsadmins puppetmasterd[32481]: Handling request,
details:
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CLIENT_A_KEY -> rsaEncryption
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CLIENT_M_SERIAL -> 05
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_COMPRESS_METHOD -> NULL
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SERVER_NAME ->
vpsadmins.liquidweb.com
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: rack.url_scheme
-> https
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: rack.run_once -
> false
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: rack.input ->
#
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: CONTENT_LENGTH -
> 3122
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CLIENT_S_DN_CN -> vz200b.liquidweb.com
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SSL_CIPHER ->
RC4-SHA
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_VERSION_LIBRARY -> OpenSSL/0.9.8e-fips-rhel5
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: HTTP_USER_AGENT
-> XMLRPC::Client (Ruby
1.8.6)
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
HTTP_CONTENT_TYPE -> text/xml;
charset=utf-8
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: PATH_INFO -> /
RPC2
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: rack.request ->
#
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: rack.errors ->
#
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_SERVER_A_KEY -> rsaEncryption
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SSL_SERVER_I_DN
-> /CN=vpsadmins.liquidweb.com
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SSL_SERVER_S_DN
-> /CN=vpsadmins.liquidweb.com
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_SERVER_V_END -> Jun 23 04:50:02 2014 GMT
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CLIENT_I_DN_CN -> vpsadmins.liquidweb.com
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CLIENT_V_START -> Jun 24 07:10:24 2009 GMT
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_VERSION_INTERFACE -> mod_ssl/2.2.3
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: HTTP_HOST ->
vpsadmins.liquidweb.com:8140
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SCRIPT_NAME ->
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SERVER_ADDR ->
67.227.140.92
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: SERVER_PROTOCOL
-> HTTP/1.1
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
SSL_CIPHER_EXPORT -> false
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env:
HTTP_CONTENT_LENGTH -> 3122
Jun 25 04:39:05 vpsadmins puppetmasterd[32481]:   env: REMOTE_ADDR ->
72.5