I'd like to override a profile-set variable for one particular system, but I can't figure out how to do it. For the system, I want to completely replace name_servers_search with "foo.com", but when I put in 'foo.com' for name_servers_search for the system (using the web interface), it just appended it to the profile's value list rather than replacing it:
# cobbler profile dumpvars --name=feds | grep name_servers_search default_name_servers_search : [] name_servers_search : ['gsfc.nasa.gov', 'nasa.gov']
# cobbler system dumpvars --name=test | grep name_servers_search default_name_servers_search : [] name_servers_search : ['gsfc.nasa.gov', 'nasa.gov', 'foo.com']
Platform: cobbler-2.2.3-2.el6.noarch, cobbler-web-2.2.3-2.el6.noarch (EPEL) on RHEL6.4
On Mon, Mar 18, 2013 at 6:56 AM, Robert Jacobson <Robert.C.Jacobson@nasa.gov
wrote:
I'd like to override a profile-set variable for one particular system, but I can't figure out how to do it. For the system, I want to completely replace name_servers_search with "foo.com", but when I put in 'foo.com' for name_servers_search for the system (using the web interface), it just appended it to the profile's value list rather than replacing it:
# cobbler profile dumpvars --name=feds | grep name_servers_search default_name_servers_search : [] name_servers_search : ['gsfc.nasa.gov', 'nasa.gov']
# cobbler system dumpvars --name=test | grep name_servers_search default_name_servers_search : [] name_servers_search : ['gsfc.nasa.gov', 'nasa.gov', 'foo.com']
Platform: cobbler-2.2.3-2.el6.noarch, cobbler-web-2.2.3-2.el6.noarch (EPEL) on RHEL6.4
Unfortunately there is no way around this, name servers and the search domains are inherited up. What you could do instead is to copy your "feds" profile and name it "feds-no-dns" or something similar which will have no name server search assigned, and then assign systems to it for which you want to manually specify the DNS variables.
On 3/18/2013 9:18 AM, James Cammarata wrote:
Unfortunately there is no way around this, name servers and the search domains are inherited up. What you could do instead is to copy your "feds" profile and name it "feds-no-dns" or something similar which will have no name server search assigned, and then assign systems to it for which you want to manually specify the DNS variables.
Thanks.
I was thinking I could also make my own post_install_network_config snippet and add an #if, like #if $name_servers_search.contains('override:') [more code to just extract the 'override' text...]
But yeah, making another profile is pretty easy too :)
I was thinking I could also make my own post_install_network_config snippet and add an #if, like #if $name_servers_search.contains('override:') [more code to just extract the 'override' text...]
But yeah, making another profile is pretty easy too :)
lots of profiles can become unwieldy - i prefer to do this within snippets and set a ksmeta variable to say 'location=foo'
Then use that in the snippet for an if / elseif / else and set everything that way -
easy to scale and can be managed in a single profile
thanks
cobbler@lists.fedorahosted.org