On Apr 2, 2007, at 2:44 AM, Jesse Reynolds wrote:
> Hello
>
> Is it possible to make up your own facts with which to test your
> manifests?
>
> Actually, what I''m trying to do is create a system that will
> generate the correct set of configuration files for some
> applications running on Windows. I''m hoping that in time puppet
> will be ported to windows, but in the mean time I''d like the task
> of configurations being generated being handled by puppet. Then
> these configs can be manually installed on the machines, for now.
>
> So what I''d like to do is run puppetd with some ''fake
facts'',
> initially just the hostname of each of the windows servers, and
> have it create a bunch of config files in a directory.
>
> Is this possible?
If you''re comfortable writing an XMLRPC client (or even just writing
a bit of Ruby -- you can use existing Puppet code for nearly
everything), it''d be pretty easy.
Just create a subclass of the ''master'' client, at
lib/puppet/network/
client/master.rb, and override the ''facts'' class method,
having it
return the facts you want to use instead of those returned by
Facter. Then make a duplicate of the ''puppetd'' script (or
modify the
original) to use this subclass, instead of the parent class.
There''s no way to do this without writing a bit of code, though.
--
The easiest way to figure the cost of living is to take your income
and
add ten percent.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com