[et-mgmt-tools] Cobbler and existing extra repos

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Thu Sep 27 17:02:47 UTC 2007


Hi,

I'm using Cobbler and a single kickstart file for both my EL5 i386 and
EL5 x86_64 profiles. Now I've got the following problem : I'd like to
include a "repo=" line in order to have anaconda use all of the
available updates instead of having to run an update right after
installation.

I already have a yum repository of the updates on my LAN, so I don't
want Cobbler to mirror anything. I just want it to add the repositories
I give it through $yum_repo_stanza.

Why don't I simply add the repo= line myself in the kickstart?
Because anaconda doesn't replace the $basearch, and I want to share the
same kickstart for i386 and x86_64.

I can't seem to figure out how to add a simple name/baseurl as a repo to
Cobbler. Is that possible at all?

I've also tried the following, but it didn't work for some reason, and
I don't really know how to debug it :-/

[...]
url --url=$tree
%include /tmp/repo

[...]
%pre
#raw
# Since the "repo" lines don't understand $basearch, hack that here
basearch=$(uname -i)
for repo in updates custom; do
  echo "repo --name=$repo
--baseurl=http://myserver/redhat/el5Server/$basearch/$repo/"
>> /tmp/repo
done
#end raw

The --available-as import option made it possible to not mirror the base
files locally (I've mounted them from my main yum server through nfs).

Any ideas about what the easiest is to achieve what I need?

Another solution would be for Cobbler to expose the basearch so that it
can be used as $basearch in the kickstart and get replaced by the
cheetah parsing. Currently I only see $arch in the Wiki, but it expands
to "x86" and not "i386".

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora release 7 (Moonshine) - Linux kernel 2.6.22.6-81.fc7
Load : 0.32 0.32 0.35




More information about the et-mgmt-tools mailing list