-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Enable/disable/list repos using redhat_subscription module #3300
Comments
As for needs:
|
I would like this functionality as well. I'm wondering about the best way to go about implementing it. Would it make sense to add this to the existing Or would it be better to split this out into a separate |
Since the modules "rhn_channel" and "rhn_register" already exist, I think it would be reasonable and consistent to create a new module called "redhat_repository" to go alongside "redhat_subscription". By the way, I'd also like this functionality. I wonder how people are managing their repos using subscription-manager in Ansible at the moment. Using the command/shell modules I'm guessing? |
As a short-term measure, I'm writing a custom "site_facts" module which will parse redhat.repo, and then I can use that with some conditionals to do "command: subscription-manager repos...". It's not really that different from the concept behind http://docs.ansible.com/ansible/include_vars_module.html I imagine... except instead of YAML/JSON it's the INI type format that Python uses with ConfigParser. I'm going to look at it again on Monday, and if I can make it nice and clean, I'll post it on my own Github account for anyone else who wants to use it. |
I've started writing such a module, but was interrupted before I could finish a first version I could test. Please note my disclaimer : my first ansible module, and moreover, my first attempt to write (with lots of copy/pasting) python code. Cave canem :) |
I have a role that's using |
Btw, it works well enough. I like the idea of a core redhat_repository module best, but this will certainly do the job for now. |
Just realized that you both appear to work at Red Hat. I'm super curious about if/how RH is developing Ansible to help manage RHEL... I've only been using RHEL for a couple of weeks, but I've used Ansible for a couple years. So far so good using it to setup RHEL servers. The only real sticking point so far has been this issue. Well, and this one, but perhaps this comment section isn't the best place for discussing such things. |
@barnabycourt not sure if you've seen this bug |
@barnabycourt, @alikins, ping. This issue is still waiting on your response. |
This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo. |
For followers of this thread, please have a look at https://github.com/jfenal/ansible-modules-jfenal, all feedbacks are welcome before I submit it to ansible core. |
@barnabycourt might be of interest to you. |
This issue was moved to ansible/ansible#28159 |
Issue Type:
Plugin Name:
redhat_subscription
Ansible Version:
N/A
Ansible Configuration:
N/A
Environment:
N/A
Summary:
redhat_subscription module does not contains options to enable/disable/list repos.
When connecting a server to the rhn or satellite and assign a subscription without activation keys, its necessary to enable or disable repos.
Steps To Reproduce:
subscription-manager command provides those options:
The text was updated successfully, but these errors were encountered: