> > The mailing lists contain
> several postings to the
> > effect of 'custom facts work, just write your own and
> be quiet',
> > which frustrates me.  
> 
> the main issue behind that is that all the functions are
> evaluated on
> the server and only there.

Hi Peter, perhaps you started writing your response before reading my entire 
message.  I suggested a possible solution - behavior similar to the 'onlyif' 
option of the exec Type.  Look at the docs, exec only runs the command on the 
client if the 'onlyif' command, which also runs on the client, returns an 
exitcode of zero.

http://reductivelabs.com/trac/puppet/wiki/TypeReference#id11

So, obviously some commands can be executed on the client and impact what 
happens next.  I'm saying it would be nice to apply such logic to a block of 
code instead of an individual exec.
 
> And this makes totally sense due to other reasons.
> 
> So if you use the client-server setup you're restricted to
> that. The
> only information the server can get _from_ the client are
> facts or
> information from an external source, which the client would
> have to feed.
> 
> But if you would stay with local execution only I think
> you'll easily
> able to do what you want.

If it's so easy, please provide an example solution.  And if your example 
consists of disparate facts to determine if specific files exist, please don't 
bother because that's specifically what I said I wasn't looking for :-)

> > A wise manager once told me that you should
> > build your systems around the needs of your business
> instead of
> > building your business around the capabilities of your
> systems.
> 
> What I could always observe is that people asking for such
> things are
> trying to get their used script thinking behaviour (to call
> it like
> that) into puppet. But one of the main ideas of puppet is
> that it
> changes the way how you look at your infrastructure and how
> you manage
> your infrastructure. So actually: Yes, puppet changes the
> way your doing
> your business.

What I'm looking for here is nothing extreme.  It's very simple.  A set of 
puppet logic that's only evaluated if a certain condition on the client is met. 
 What's wrong with that?  It sounds very reasonable to me.  On the contrary, 
having the mindset that everything should be written as a custom fact, or 
extension or whatever, illustrates the point I was trying to make.  Sure it 
works, but it's a work-around.  People get used to the extra effort required 
and consider it old-hat when in actuality (again, IMHO) it's not ideal and in 
many scenarios is a serious limitation.

If we use such lines of thinking, then let's just go ahead and get rid of the 
conditional operators introduced in 0.24.6.  The only test you need is true or 
false!  Of course I'm kidding here, I love the ability to use more complex 
expressions.


Anyway, it appears that what I'm looking for may not be possible today without 
custom facts.  Ok, fine.  My next question is, why?  If it's because such 
functionality just hasn't been added yet, that's perfectly reasonable.  I'll be 
glad to submit a more detailed and descriptive feature request.  However, if 
the answer is because people (most importantly, puppet developers) believe that 
what I'm looking for (ability to conditionally process puppet logic based on 
the result of a command executed on the client) is unwanted by users, well I 
don't believe that's true.  I definitely want it and it's clear others do as 
well.

Thank you for your time.


      

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to