Generating a yum repository file to use foreman server's local repositories

Hello,

I have an older foreman/katello installation, with localized centos 7 repositories. (it’s really old, but that’s not the issue: one of my co-workers will begin upgrading it soon).

I am using ansible, and when localizing a vm, the playlist installs the katello…noarch.rpm produced by the foreman server, then subscribes using the correct activation key. After this is complete, I do see the host listed.

But here’s my confusion: the ansible playbook deletes the centos repo files, but then no replacement is generated. how do I get it to configure a yum.repos.d file to use the foreman server’s repositories? or is there one I can download and drop into place?

–jason

This is done via subscription-manager. Subscription-manager adds it yum-plugin and manages the file /etc/yum.repos.d/redhat.repo.

I will test this. Thanks for your reply!