Chris O'Regan wrote:
To test my Cobbler setup, I copied a (pre-Cobbler) kickstart
configuration file into the kickstarts directory and set my system to
use it. That worked great. Now I am working on a default kickstart file
that will use templates to build a custom configuration automatically. I
want my system to inherit this. How can I do this from the command line?
I have tried:
cobbler system edit --name=myhost --kickstart=""
But it does not clear the value I set previously. Is there special
syntax to do this, or do I have to remove it from the "systems" file
manually?
The syntax you provided above /should/ work, but for some reason it does
not. Perhaps bash does not like passing empty strings?
The following syntax does work, as tested, however:
cobbler system edit --name=myhost --kickstart=delete
On a related now, how do I build more complex variables with
--ks_meta?
I tried the following (and a number of variations) but the parsing of it
was botched:
cobbler distro edit --name=mydistro --ksmeta='method="nfs
--server=myserver --dir=/path/to/iso/"'
The joys of shell quoting :)
Cobbler doesn't like the equals in your variables because that's how we
store the variables as seperate key/value pairs. This would be a good
opportunity to look at:
https://fedorahosted.org/cobbler/wiki/KickstartSnippets
Using the "Advanced Snippets" feature you can have something as simple as
$SNIPPET::method in your template
And sub in the correct method based on the name of the profile/system
being used.
Hope that helps!
--Michael