Thanks James. My current method is to do exactly that - I just wondered if I could avoid sending snippets down that I can tell server side based on REMOTE_ADDR won't be needed. I might poke generate_kickstart() to see if I can work out what variable, if any, it appears as while parsing the templates.

Thanks,

-Alex


On Tue, May 14, 2013 at 1:52 PM, James Cammarata <jimi@sngx.net> wrote:
On Tue, May 14, 2013 at 5:50 AM, Alex Davies <alex@davz.net> wrote:
Hi,

Is there a way to get the client IP retrieving the kickstart file (as opposed to the IP configured for a given system) in getVar in a snippet? Something like getVar(REMOTE_ADDR, None)


Snippets are executed on the client side, so you should be able to figure out any IP that is used there.

The REMOTE_ADDR is captured when the kickstart is retrieved (in cobbler/remote.py generate_kickstart()), though I'm not sure if that's helpful to you. 

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler




--
Alex Davies

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender immediately by e-mail and delete this e-mail permanently.