Thanks for the insight, I've added some detail below as I imagine my use case is very typical. Any help appreciated.
I've used the import for the distro
cobbler import --name=CentOS-59 --arch=x86_64 --path=/mnt/dvd1
and as you suggested already contains ks_meta tree key/value information.
I've also created a custom kickstart template based on the sample.ks (on slight additions) so it includes $yum_repo_stanza and $yum_config_stanza.
I think I've been missing the point and expecting more from the import! Our servers will not have any visibility to the internet hence all yum request should come back to cobbler.
Cobbler is used to build a very basic system, and then in the profile post $SNIPPET('kickstart_done') we load a shell script to run custom yum installs (of which all packages e.g. https can be found on the distro's [base]).
I mis-understood the 'yum_post_install_mirror', it only effects mirrored Repos and not the imported Distros?
So, Cobbler at no point is configured to modify the distro files populated into /etc/yum.repos.d/, i.e. no parsing of the standard CentOS-Base.repo file occurs?
This is part of the CentOS-Base.repo file as it is….
[base]
name=CentOS-$releasever - Base
gpgcheck=1
I was expecting/hoping for something like this, is this correct/can it be achieved easily?
name=CentOS-$releasever - Base
==============================
Here's the output from my setup.
cat /var/lib/cobbler/config/distros.d/CentOS-59-x86_64.json | python -mjson.tool
{
"arch": "x86_64",
"boot_files": {},
"breed": "redhat",
"comment": "",
"ctime": 1379326634.6427431,
"depth": 0,
"fetchable_files": {},
"initrd": "/var/www/cobbler/ks_mirror/CentOS-59-x86_64/images/pxeboot/initrd.img",
"kernel": "/var/www/cobbler/ks_mirror/CentOS-59-x86_64/images/pxeboot/vmlinuz",
"kernel_options": {},
"kernel_options_post": {},
"ks_meta": {
},
"mgmt_classes": [],
"mtime": 1379326634.6427431,
"name": "CentOS-59-x86_64",
"os_version": "rhel5",
"owners": [
"admin"
],
"redhat_management_key": "<<inherit>>",
"redhat_management_server": "<<inherit>>",
"source_repos": [],
"template_files": {},
"tree_build_time": 0,
"uid": "MTM3OTMyNjYzNC42NDI5NTUxNTEuNTEwNjI"
}
[root@cobbler-repo cobbler]# cat /var/lib/cobbler/config/profiles.d/CentOS-59_base.json | python -mjson.tool
{
"boot_files": {},
"comment": "",
"ctime": 1379391175.9183309,
"depth": 1,
"dhcp_tag": "default",
"distro": "CentOS-59-x86_64",
"enable_gpxe": 0,
"enable_menu": 1,
"fetchable_files": {},
"kernel_options": {},
"kernel_options_post": {},
"kickstart": "/var/lib/cobbler/kickstarts/bg-centos5-core.ks",
"ks_meta": {},
"mgmt_classes": [],
"mgmt_parameters": "<<inherit>>",
"mtime": 1379633112.0474119,
"name": "CentOS-59_base",
"name_servers": [
"10.20.1.25"
],
"name_servers_search": [],
"owners": [
"admin"
],
"parent": "",
"redhat_management_key": "<<inherit>>",
"redhat_management_server": "<<inherit>>",
"repos": [],
"server": "<<inherit>>",
"template_files": {},
"template_remote_kickstarts": 0,
"uid": "MTM3OTM5MTE3NS45MjczNjQzNjEuNDE3NTc",
"virt_auto_boot": 1,
"virt_bridge": "xenbr0",
"virt_cpus": 1,
"virt_disk_driver": "raw",
"virt_file_size": 5,
"virt_path": "",
"virt_ram": 512,
"virt_type": "vmware"
}
On 20/09/2013, at 1:26 PM, James Cammarata <
jimi@sngx.net> wrote:
By default, when you've run import on a distro, the cobbler server is configured as the default source in the kickstart assuming you have the $yum_repo_stanza and $yum_config_stanza variables in your kickstart (refer to the sample_end.ks we package to see where they go). Typically you will not setup a repo for the base distro, but you will usually setup repos for updates/security/EPEL etc.
If you added the distro manual with "distro add", you'll need to add the tree variable to the distros ksmeta:
Where <dir> is the directory (symlink) in /var/www/cobbler/links/ that points at your distro.
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.orghttps://lists.fedorahosted.org/mailman/listinfo/cobbler