Rainer Duffner wrote:
Hi,
When installing RHEL5 via cobbler, I do this via a special VLAN with
IPs in the RFC1918-space.
So, after activating "yum_post_install_mirror: 1", it adds the location
of the files in /etc/yum.repos.d.
However, later on, this VLAN is most likely no longer present and
configured.
All the files are available via a "public" IP, though, that is reachable
by most systems after the network has been brought up.
Should I just go and add a %post section in the template that seds over
the files in /etc/yum.repos.d/ and replace the IPs?
Or what would be the recommended solution?
There should be easier ways, but your configuration might not allow them.
Details:
If you know where the systems are going to finally reside, recent
cobbler has a parameter on each
profile and/or system called --server-override which will override all
IP's/server addresses in settings
for anything using that profile/system record.
This was originally added in 0.6.3 and is probably more thoroughly
implemented in 0.6.5.
If you have multiple profiles for multiple locations, you could perhaps
use inherited profiles to make a version
that had a different server parameter, like this:
cobbler profile add --name=foo ...
cobbler profile add --name=datacenter2-foo --parent=foo
--server-override=cobbler2.example.com
Does that make sense?
The problem however is if they are provisioned on one VLAN and then
moved to another, in which case you
need to turn off yum_post_install_mirror altogether and just use
something like a config management system
to push out the repo definition files *OR* just add some special stuff
in %post of your kickstart to create
those files in /etc/yum.repos.d ... your sed trick there would probably
work fine.
--Michael
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools