[rudder-users] Variable

Jonathan Clarke jonathan.clarke at normation.com
Fri Jul 5 12:20:42 CEST 2013


On 05/07/13 11:58, Le Haies Cyrille wrote:
>
> Hello,
>
>  
>
> I do a « export  MYVAR=hello » in my server and i want read this
> variable MYVAR  in rudder ??
>
> Is it possible ??
>
>  
>

Hi Cyrille,

Yes, the inventory agent (FusionInventory) will pick up environment
variables that are in the context that CFEngine runs in. This means you
must make sure the "export MYVAR=hello" command is run before cf-execd
is launched (from the rudder-agent init script), ie in /etc/profile or
in the init script itself.

Also, note that the inventory is only run once a day, in the night. So
you must either wait one day, or force an inventory run on the node to
test (see
http://www.rudder-project.org/rudder-doc-2.6/rudder-doc.html#_inventory).

Then, you can see the value of this variable in the node details pane,
under the "Environment variables" tab.

Jonathan
-- 
------------------------------------------------------------------------
*Jonathan CLARKE*
/CTO - Directeur technique/
Normation <http://www.normation.com>
------------------------------------------------------------------------
*87 rue de Turbigo, 75003 Paris, France*
Telephone: 	+33 (0)1 83 62 41 24
Mobile: 	+33 (0)6 99 60 03 10
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20130705/c900a450/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo-square.png
Type: image/png
Size: 3503 bytes
Desc: not available
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20130705/c900a450/attachment.png>


More information about the rudder-users mailing list