community.general
community.general copied to clipboard
redhat_subscription: add new pools keeping current consumed
Summary
I'd like to append new pools/products to the already consumed ones. User/password or activationkey would not be needed in this case -- system is already registered. The behavior would be similar to rhsm_repos' purge
parameter. In redhat_subscription, purge would default to true.
Issue Type
Feature Idea
Component Name
redhat_subscription
Additional Information
- redhat_subscription:
pools: "epel"
purge: no
become: yes
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @alikins @barnabycourt @kahowell click here for bot help
I agree we need this implementation.
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
I have agreed with this idea in the past. Even to the point that I modified redhat_subscription.py
to skip the removal of serials/poolIDs it found that were not explicitly provided. After trying to manage that custom module across the update from ansible 2.7 to 2.9 and beyond I started thinking of another way.
I was previously adding specific pools for specific roles by running redhat_subscription
in those role main
task. Now I build a composite list of pools as a host (or role) specific variable ahead of time. All my centos 7 hosts get a baseline of my CentOS 7 and EPEL pool IDs. Then any specific role gets its required pool IDs added to that list variable. Then I run the redhat_subscription
once in a baseline OS role.
All that said, I do think it would make sense to have an append
state or a purge
parameter as you suggest.
I have agreed with this idea in the past. Even to the point that I modified
redhat_subscription.py
to skip the removal of serials/poolIDs it found that were not explicitly provided. After trying to manage that custom module across the update from ansible 2.7 to 2.9 and beyond I started thinking of another way.
@eightnoneone Any chance you could share that modified version? Perhaps someone here could adapt it so that it would be PR worthy.
cc @cnsnyder @ptoscano click here for bot help