I want to put nameserver settings in my dhcp template but it doesn't appear that the $name_servers variable is available within dhcp.template. I could use some other variable that is exposed to the template but it would be nice if I didn't have to duplicate the name servers field. Any better solution?
-Eric
To look at variables available, use "cobbler system dumpvars --name=foo"
You probably also want to look here to see how networking data structures are accessed. It's not terribly pretty, but that's just the way they are structured:
https://github.com/cobbler/cobbler/blob/master/snippets/pre_install_network_...
On Wednesday, February 1, 2012 at 7:04 PM, Eric Heydrick wrote:
I want to put nameserver settings in my dhcp template but it doesn't appear that the $name_servers variable is available within dhcp.template. I could use some other variable that is exposed to the template but it would be nice if I didn't have to duplicate the name servers field. Any better solution?
-Eric _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org (mailto:cobbler@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler
On Wed, Feb 1, 2012 at 4:11 PM, Michael DeHaan michael.dehaan@gmail.com wrote:
To look at variables available, use "cobbler system dumpvars --name=foo"
You probably also want to look here to see how networking data structures are accessed. It's not terribly pretty, but that's just the way they are structured:
https://github.com/cobbler/cobbler/blob/master/snippets/pre_install_network_...
I see the $name_servers variable but not sure how that can be used within dhcp.template. I'd expect something like $iface.name_servers[0] but $name_servers is not available in the $interfaces structure. Is there another way to access the per-system name_servers var?
Ah, told you wrong.
Name servers is an array.
On Wednesday, February 1, 2012 at 7:47 PM, Eric Heydrick wrote:
On Wed, Feb 1, 2012 at 4:11 PM, Michael DeHaan <michael.dehaan@gmail.com (mailto:michael.dehaan@gmail.com)> wrote:
To look at variables available, use "cobbler system dumpvars --name=foo"
You probably also want to look here to see how networking data structures are accessed. It's not terribly pretty, but that's just the way they are structured:
https://github.com/cobbler/cobbler/blob/master/snippets/pre_install_network_...
I see the $name_servers variable but not sure how that can be used within dhcp.template. I'd expect something like $iface.name_servers[0] but $name_servers is not available in the $interfaces structure. Is there another way to access the per-system name_servers var? _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org (mailto:cobbler@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler
cobbler@lists.fedorahosted.org