<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 17/03/2014 23:51, Chris wrote:<br>
</div>
<blockquote cite="mid:6b02c71604ff1cf364d723aa1d637a38@deksai.com"
type="cite">
<br>
<blockquote type="cite">
<blockquote type="cite">I'm a bit stuck trying to see if I can
migrate our current cfengine classes to rudder. Right now
with cfengine, I can define classes based on arbitrary
commands. For instance, because of
<a class="moz-txt-link-freetext" href="https://cfengine.com/dev/issues/3420">https://cfengine.com/dev/issues/3420</a>, I have to use a module
to define classes based on network location. This is quite
useful. While I know rudder will let you run a command to set
variables, I'm not exactly sure how I would use this to define
classes. Is there any way to make a dynamic group based on
the output of a command?
<br>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">For you specific use case about network,
you can create group based on
<br>
network interface (we use inventory information returned by
Fusion
<br>
Inventory, hence we are not suffering from the CFEngine bug you
list).
<br>
<br>
On the more general use case, you can create groups based on
<br>
environment variables within Rudder. So you could have
environnement
<br>
variables defined ad hoc for your needs, and use them to create
groups
<br>
<br>
does it help ?
<br>
</blockquote>
<br>
Yes, I think I could work around quite a few things with
environment variables. If I were to get really desparate though,
do you have a rough idea of how much work it would be to add hooks
to inject generic information to the inventory? I see that I'd
either have to add to the ldap schema or abuse other generic
attributes, and add methods to the "addInformationsToInventory"
bundle. It looks like I'd have to work on endpoint/upload, but
haven't made it any further than that. This would allow someone
to emulate defining classes inside cfengine, and emulate the
resulting cf-hub knowledge that came from it.
<br>
</blockquote>
<br>
Your need seems to be a quite relevant one, and if you like to, I
would be really happy to help you design and implement something
around that. <br>
<br>
Moreover, it seems to be a really neet feature for "cloud-init like"
need. If we are able to put somewhere in the node some JSON file
(for example, or simple key=value property like file), grab it in
the inventory, use some of the key=value in the json to add the node
to groups, that would be great !<br>
<br>
Could you open a ticket on that, assigning Jon (our product owner :)
? The goal would be to reach a least use cases and what is wanted in
the ticket. <br>
<br>
On the other hand, I'm not sure what you mean by " This would allow
someone to emulate defining classes inside cfengine etc". Do you
mean that you want to somehow have these information translated into
cfengine classes ? Or something else ?<br>
<br>
<br>
<br>
<blockquote cite="mid:6b02c71604ff1cf364d723aa1d637a38@deksai.com"
type="cite">
<br>
Another question is how to trigger rules based on the outcome of
other rules. Perhaps I haven't looked closely enough, but is this
possible out of the box or does that require something custom to
glue things together?
<br>
<br>
</blockquote>
<br>
<br>
Do you have an example of what you need ? I'm not sure I understand
what you need here. <br>
<br>
Thanks, <br>
<br>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style type="text/css"><!--
a.redlink:link { color: #962322; text-decoration: none; }
a.redlink:visited { color: #962322; text-decoration: none; }
.sig { font-family: sans-serif; font-size: small; }
.sigsmall { font-family: sans-serif; font-size: x-small; }
--></style>
<table border="0" cellpadding="0" cellspacing="2" width="380">
<tbody>
<tr>
<td colspan="2">
<hr></td>
</tr>
<tr>
<td colspan="2"><b><img alt=""
src="cid:part1.06000900.01000705@normation.com"
align="left" hspace="10" width="50" height="50"> <span
class="sig">François ARMAND</span></b><br>
<span class="sig"><i>Directeur de la R&D</i></span><br>
<span class="sig"><a class="redlink"
href="http://www.normation.com">Normation</a></span> </td>
</tr>
<tr>
<td colspan="2">
<hr></td>
</tr>
<tr>
<td colspan="2"><span class="sigsmall"><b>87 rue de Turbigo,
75003 Paris, France</b></span></td>
</tr>
<tr>
<td><span class="sigsmall">Telephone:</span></td>
<td><span class="sigsmall">+33 (0)1 83 62 99 23</span></td>
</tr>
<tr>
<td><span class="sigsmall">Mobile:</span></td>
<td><span class="sigsmall">+33 (0)6 63 37 60 55</span></td>
</tr>
<tr>
<td colspan="2">
<hr></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>