[Spacewalk-list] rhn.system.custom_info(key_name)

Kobus Bensch kobus.bensch at lovefilm.com
Fri Mar 18 10:03:34 UTC 2011


Thanks for the reply, but the bit you described i already sussed. I 
would like to populate the custom_info from a system based variable, ie.:

var set on system of like export SYS_VAR_HOST_JOB=SVNSRVR

I would like this system based var to be imported and set in SW under 
custom info key SW_CUST_INF_HOST_JOB so that I can use it in scripts like

{|rhn.system.custom_info(SW_CUST_INF_HOST_JOB) = $SYS_VAR_HOST_JOB

On 17/03/11 22:55, Colin Coe wrote:
> On Thu, Mar 17, 2011 at 6:00 PM, Kobus Bensch<kobus.bensch at lovefilm.com>  wrote:
>> Hi everyone
>>
>> I am looking at custom info. Is there a way I can use vars set on the
>> server to populate the key to then use in the config file?
>>
>> Kobus
>>
> Custom info keys are defined globally (with an org) but can
> potentially have a different value for each system.  Case in point we
> have two data centres about 1600km apart.  Nodes at location A use NFS
> server A, while those in location B use NFS server B.  A simple script
> is used to set the nfs_server custom info key for each server and then
> the key is just referenced in the autofs file like:
> /fileshare      -rw,hard,intr     {|
> rhn.system.custom_info(nfs_server) = defaultnfs.company.com
> |}:/fileshare
>
> If the custom info key is not set for a server it will use
> 'defaultnfs.company.com'.
>
> I hope this is what you were after.
>
> CC
>

-- 
*Kobus Bensch*
Linux Administrator
kobus.bensch at lovefilm.com

No.9 | 6 Portal Way | London | W3 6RU |
T: +44 (0)20 8896 8014 | F: +44 (0)20 8896 8111
<http://www.lovefilm.com>

-----------------------------------------------------------------------------------------------------------------------------------------
LOVEFiLM UK Limited is a company registered in England and Wales. 
Registered Number: 06528297. 
Registered Office: No.9, 6 Portal Way, London W3 6RU, United Kingdom.

This e-mail is confidential to the ordinary user of the e-mail address to which it was addressed. If you have received it in error, 
please delete it from your system and notify the sender immediately.

This email message has been delivered safely and archived online by Mimecast.
For more information please visit http://www.mimecast.co.uk 
-----------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20110318/6f067b51/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lfi.gif
Type: image/gif
Size: 1641 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20110318/6f067b51/attachment.gif>


More information about the Spacewalk-list mailing list