I'm currently running cobbler 2.0.3 on CentOS 5.
I was wondering if there is an automated way to have a repo included in cobbler, but have it be disabled by default when it's listed in /etc/yum.repos.d/cobbler-config.repo.
For example, I would not want it to be listed in $yum_repo_stanza, but would want it listed in the output of $yum_config_stanza, but with enabled=0.
Basically, I want to have a repo kept up to date with reposync, available after an install with "yum --enablerepo=XYZ", but not enabled during the initial installation.
-- Owen Beckley - owenb@foxriver.com
On Fri, May 27, 2011 at 01:21:14PM -0500, Owen Beckley wrote:
I'm currently running cobbler 2.0.3 on CentOS 5.
I was wondering if there is an automated way to have a repo included in cobbler, but have it be disabled by default when it's listed in /etc/yum.repos.d/cobbler-config.repo.
You could always - add it as usual - disable it in %post with a line of sed
The only downside I see is if you list packages in %packages that are more current in your 'optional' repo they will be fetched from there.
Christian
On 05/27/2011 11:34 PM, Christian Horn wrote:
On Fri, May 27, 2011 at 01:21:14PM -0500, Owen Beckley wrote:
I'm currently running cobbler 2.0.3 on CentOS 5.
I was wondering if there is an automated way to have a repo included in cobbler, but have it be disabled by default when it's listed in /etc/yum.repos.d/cobbler-config.repo.
You could always
- add it as usual
- disable it in %post with a line of sed
The only downside I see is if you list packages in %packages that are more current in your 'optional' repo they will be fetched from there.
Depending on how broad you want the "disabled-ness" to be, it's could even easier than that. Inside each repo directory, there is a file called "config.repo" that is the template for what ends up Cobbler generated cobbler-config.repo. You can simply change the "enabled" line there and all future deployments with that repo associated will have the repo available, but not enabled by default.
I like to do this with the RPMForge repo since they provide good packages, but sometimes conflict with what comes in the RHEL base OS.
/var/www/cobbler/repo_mirror/RPMForge-5-x86_64 # cat config.repo [RPMForge-5-x86_64] name=RPMForge-5-x86_64 baseurl=http://$%7Bserver%7D/cobbler/repo_mirror/RPMForge-5-x86_64 enabled=0 priority=90 gpgcheck=0
bounces@lists.fedorahosted.org] On Behalf Of Wes Hardin Sent: Monday, May 30, 2011 11:23 AM On 05/27/2011 11:34 PM, Christian Horn wrote:
On Fri, May 27, 2011 at 01:21:14PM -0500, Owen Beckley wrote:
I was wondering if there is an automated way to have a repo
included
in
cobbler, but have it be disabled by default when it's listed in /etc/yum.repos.d/cobbler-config.repo.
- disable it in %post with a line of sed
The only downside I see is if you list packages in %packages that
are
more current in your 'optional' repo they will be fetched from
there.
Depending on how broad you want the "disabled-ness" to be, it's could even easier than that. Inside each repo directory, there is a file called "config.repo" that is the template for what ends up Cobbler generated cobbler-config.repo. You can simply change the "enabled" line there and all
This gets me half way. The repo in question ends up disabled in /etc/yum.repos.d, but is still listed in the expansion of $yum_repo_stanza.
Should I request a new feature?
On 05/31/2011 09:14 AM, Owen Beckley wrote:
bounces@lists.fedorahosted.org] On Behalf Of Wes Hardin Sent: Monday, May 30, 2011 11:23 AM On 05/27/2011 11:34 PM, Christian Horn wrote:
On Fri, May 27, 2011 at 01:21:14PM -0500, Owen Beckley wrote:
I was wondering if there is an automated way to have a repo
included
in
cobbler, but have it be disabled by default when it's listed in /etc/yum.repos.d/cobbler-config.repo.
- disable it in %post with a line of sed
The only downside I see is if you list packages in %packages that
are
more current in your 'optional' repo they will be fetched from
there.
Depending on how broad you want the "disabled-ness" to be, it's could even easier than that. Inside each repo directory, there is a file called "config.repo" that is the template for what ends up Cobbler generated cobbler-config.repo. You can simply change the "enabled" line there and all
This gets me half way. The repo in question ends up disabled in /etc/yum.repos.d, but is still listed in the expansion of $yum_repo_stanza.
Should I request a new feature?
Ah yes, I don't deploy RHEL5 or newer widely yet, so I don't use and didn't catch the subtle difference of $yum_repo_stanza.
Certainly sounds like a worthwhile enhancement to me. I'd considered making the request myself for a checkbox in the web GUI to disable a repo but the config.repo edit was a simple enough workaround for my use. -- /* Wes Hardin */ UNIX/Linux Systems Administrator, IT Engineering Support Maxim Integrated Products: Innovation Delivered
This gets me half way. The repo in question ends up disabled in /etc/yum.repos.d, but is still listed in the expansion of $yum_repo_stanza.
Should I request a new feature?
Ah yes, I don't deploy RHEL5 or newer widely yet, so I don't use and didn't catch the subtle difference of $yum_repo_stanza.
I did a little more searching and found that the solution has already been added. I needed to add "enabled=0" to the Yum Options field under the Advanced section of the Repo GUI.
Here's the reference I found: http://www.redhat.com/archives/et-mgmt-tools/2008-March/msg00125.html
cobbler@lists.fedorahosted.org