Red Hat Bugzilla – Bug 1027406
cloud-init should probably have yum_add_repo module enabled
Last modified: 2015-06-19 11:23:06 EDT
Description of problem:
on RHEL/FEDORA it would certainly be wise to enable cloud-init module yum_add_repo which adds possibility to add repo easily from the cloud-config like:
name: Latest RHEL 6.5 snapshot
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. check whether the above cloud-config creates the repo
no repo created
* The module is enabled in /etc/cloud/cloud.cnf
* repo created
the workaround is to list the modules in the cloud-config, but it would be convenient to have the module on yum systems by default.
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
There is a workaround. Adding this to the cloud-config makes cloud-init to reconfigure itself at very early stage of the booting, so it will enable the yum_add_repo for itself.
- 'echo " - yum_add_repo:" >> /etc/cloud/cloud.cnf'
(In reply to Jaroslav Henner from comment #4)
> There is a workaround. Adding this to the cloud-config makes cloud-init to
> reconfigure itself at very early stage of the booting, so it will enable the
> yum_add_repo for itself.
> - 'echo " - yum_add_repo:" >> /etc/cloud/cloud.cnf'
Sorry, I made a mistake. This doesn't work, but following workaround does:
- 'sed -i "s/cloud_config_modules:/&\n - yum_add_repo/" /etc/cloud/cloud.cfg'
yum install openstack-packstack -y
Note that one cannot use the cloud-init "packages". It doesn't work.
The default cloud.cfg in the 0.7.5 packages includes the yum-add-repo module.