Amidst all my development with the kickstart features, I made a script
that does this directly with the cobbler API, perhaps this can be
included instead of using any URL stuff.
#!/usr/bin/env python
import sys
import cobbler.api
ba = cobbler.api.BootAPI()
if sys.argv[1] != '':
profile = sys.argv[1]
else:
system = None
if sys.argv[2] != '':
system = sys.argv[2]
else:
system = None
print ba.generate_kickstart(profile, system)
~
Dan
Michael DeHaan wrote:
Ben Riggs wrote:
> In the spirit of KISS and versatility, I think simply dumping the
> rendered kickstart to stdout would be a better option. This allows one
> to easily pipe it elsewhere, and simply dumping it to the terminal isn't
> going to hurt anything. The ability to have the rendered kickstart
> available form the command line, however, is an excellent addition.
>
> Ben
>
>
I think so to... fetch it with urlgrabber.urlread, print to stdout. Also
saves the elinks dependency.
Great feature though, no doubt, can you also add this to profile as well
so it can be used both for per-profile and per-system
based installations?
If you can take care of that I'll gladly apply this.
Thanks!
--Michael
> Dave Hatton wrote:
>
>
>> The attached patch adds a "getks" option to "cobbler
system".
>>
>> This renders the finished kickstart file for a specified system on the
>> console or terminal winder using the elinks ascii browser.
>>
>> eg: cobbler system getks --name teapot
>>
>> I find this very useful for checking the kickstart genrerated by cobbler
>> in an environment where I can't use http.
>>
>> I hope others find this useful and it can be added to the base cobbler
>> system.
>>
>> Regards
>>
>> Dave Hatton
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> cobbler mailing list
>> cobbler(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
>
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler