-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redhat_subscription: Fix usage of ConfigParser #54815
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansibot
added
affects_2.8
This issue/PR affects Ansible v2.8
bug
This issue/PR relates to a bug.
community_review
In order to be merged, this PR must follow the community review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
packaging
Packaging category
python3
small_patch
support:community
This issue/PR relates to code supported by the Ansible community.
labels
Apr 3, 2019
mkrizek
approved these changes
Apr 4, 2019
mkrizek
removed
the
needs_triage
Needs a first human triage before being processed.
label
Apr 4, 2019
samdoran
approved these changes
Apr 4, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create a changelog fragment. See this fragment as an example.
cnsnyder
force-pushed
the
redhat_sub_cp_usage
branch
from
April 8, 2019 13:26
a0e6883
to
6eb26f6
Compare
@samdoran I've added a changelog fragment as requested. Is there anything else this PR needs? |
@cnsnyder Thanks! |
goneri
pushed a commit
to goneri/ansible
that referenced
this pull request
Apr 16, 2019
(cherry picked from commit 09f68fc)
This was referenced Apr 16, 2019
goneri
pushed a commit
to goneri/ansible
that referenced
this pull request
Apr 16, 2019
(cherry picked from commit 09f68fc)
abadger
pushed a commit
that referenced
this pull request
Apr 16, 2019
(cherry picked from commit 09f68fc)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.8
This issue/PR affects Ansible v2.8
bug
This issue/PR relates to a bug.
community_review
In order to be merged, this PR must follow the community review workflow.
module
This issue/PR relates to a module.
new_contributor
This PR is the first contribution by a new community member.
packaging
Packaging category
python3
support:community
This issue/PR relates to code supported by the Ansible community.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
This PR fixes an issue in the usage of configparser in the redhat_subscription module. The configparser module is imported from ansible.module_utils.six.moves as of f75ffe4. After that change was made, any attempt to use the redhat_subscription module with an ansible_python_interpreter of python 3+ fail with the following:
The error ultimately comes from passing integers to ConfigParser.set where strings were expected when updating the rhsm and rhn yum plugin configurations (under /etc/yum/pluginconf.d/).
ISSUE TYPE
COMPONENT NAME
redhat_subscription
ADDITIONAL INFORMATION
This issue seems only to surface when a python 3 interpreter is used on the target machine(s).
Here's a sample inventory file for my reproducer (named inv):
The playbook used is as follows (named test.yml):
With these files in place execute:
ansible-playbook test.yml -i ./inv
Output: