theforeman/community-templates — pull request #68 by jistr (2014-04-04 14:29:33+00:00)
Title: redhat_register snippet - fix enabling repos

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1039910

Repositories specified in `subscription_manager_repos` parameter
didn't get enabled when using redhat_register template snippet. The
`yum-config-manager --enable ...` command only works when
`/etc/yum.repos.d/redhat.repo` file already exists. But
`subscription-manager register ... --auto-attach` command will not
create the repo file. We need to run `subscription-manager repos
--list` to trigger creation of the repo file.