[rudder-dev] rudder variables

Nicolas Charles nicolas.charles at normation.com
Mon Apr 8 12:44:32 CEST 2013


On 08/04/2013 12:30, Nicolas Perron wrote:
>
>> Hi,
>>
>> Just out of curiosity, I've seenhttp://www.rudder-
>> 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
> Hello Michael,
>
> The "Rudder variables" the ticket express in 
> http://www.rudder-project.org/redmine/issues/3332 are the values typed 
> in a Directive. Theses values initialize some Rudder values which will 
> generate CFEngine promises.
>
> The problem pointed out here was about reusable Rudder variables 
> initialized by Directives based on Technique /*Generic Variable 
> Definition*/. With this Technique, it is possible to define a variable 
> /foo/ and to reuse it with another Technique, like /*MOTD 
> configuration*/ by setting the content of the MOTD with the value of 
> the variable /${generic_variable_definition.foo}/.
>
> Regards,

Hello all,

Actually, the Rudder variables are *not* based on Technique Generic 
Variable Definition.
This Technique allow to define variables, that you reuse in a generic 
way in yout directives, with the /${generic_variable_definition.foo}/ 
notation, while Rudder Variables are values replaced by Rudder during 
the promises generation.

There two types of Rudder Variables :
- variables refering to the node : they allow to access to simple info 
about the current node, based on the inventory
         ${rudder.node.id} : uuid of the node
         ${rudder.node.hostname} : hostname of the node
         ${rudder.node.admin} : login of administrator of the node
   and also for it policy server :
          ${rudder.node.policyserver.ACCESSOR}, where ACCESSOR can be 
id, hostname, or admin
- 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)

Regards,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20130408/5f6623bc/attachment.html>


More information about the rudder-dev mailing list