<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 08/04/2013 12:30, Nicolas Perron wrote:
    <blockquote cite="mid:51629C32.2080300@normation.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      <blockquote cite="mid:7113904.DdyaOH9qIO@hgis96" type="cite">
        <pre wrap="">Hi,

Just out of curiosity, I've seen <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.rudder">http://www.rudder</a>-
project.org/redmine/issues/3332 in 2.4.4 changelog and I started wondering, 
what are Rudder variables and how do they work?

Thanks,
M</pre>
      </blockquote>
      <font face="Ubuntu">Hello Michael,<br>
        <br>
        The "Rudder variables" the ticket express in <a
          moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://www.rudder-project.org/redmine/issues/3332">http://www.rudder-project.org/redmine/issues/3332</a>
        are the values typed in a Directive. Theses values initialize
        some Rudder values which will generate CFEngine promises.<br>
        <br>
        The problem pointed out here was about reusable Rudder variables
        initialized by Directives based on Technique <i><b>Generic
            Variable Definition</b></i>. With this Technique, it is
        possible to define a variable <i>foo</i> and to reuse it with
        another Technique, like <i><b>MOTD configuration</b></i> by
        setting the content of the MOTD with the value of the variable <i>${generic_variable_definition.foo}</i>.<br>
        <br>
        Regards,</font></blockquote>
    <br>
    Hello all,<br>
    <br>
    Actually, the Rudder variables are *not* based on Technique Generic
    Variable Definition. <br>
    This Technique allow to define variables, that you reuse in a
    generic way in yout directives, with the <font face="Ubuntu"><i>${generic_variable_definition.foo}</i>
      notation, while Rudder Variables are values replaced by Rudder
      during the promises generation.<br>
      <br>
      There two types of Rudder Variables :<br>
      - variables refering to the node : they allow to access to simple
      info about the current node, based on the inventory<br>
              ${rudder.node.id} : uuid of the node<br>
              ${rudder.node.hostname} : hostname of the node<br>
              ${rudder.node.admin} : login of administrator of the node<br>
        and also for it policy server :<br>
               ${rudder.node.policyserver.ACCESSOR}, where ACCESSOR can
      be id, hostname, or admin<br>
      - variables refering to variables defined in other Rule :
      ${rudder.rule_id.VARIABLE_NAME} will look in the rule with id
      rule_id for the value of the variable VARIABLE_NAME (as defined in
      the Technique)<br>
      <br>
      Regards,<br>
      Nicolas<br>
    </font>
  </body>
</html>