-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add toggle for verbose logging to pkg5.py #8382
Conversation
Updated params with 'verbose' mode (defaults to False, which is existing behavior) to allow users to toggle verbose to True, which disables the '-q' flag that was hardcoded in the original module
This comment was marked as outdated.
This comment was marked as outdated.
The new verbosity argument on line 172 broke the 160 character length PEP8 requirement - split the line in two to conform to PEP8
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.
Thanks for your contribution!
plugins/modules/pkg5.py
Outdated
@@ -54,6 +54,11 @@ | |||
- Refresh publishers before execution. | |||
type: bool | |||
default: true | |||
verbose: | |||
description: | |||
- Toggles quiet execution on or off |
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.
I personally find the following clearer to understand:
- Toggles quiet execution on or off | |
- Set to V(true) to disable quiet execution. |
Co-authored-by: Felix Fontein <felix@fontein.de>
…n for semantic markup Co-authored-by: Felix Fontein <felix@fontein.de>
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.
LGTM. Will merge this tomorrow if nobody objects.
@Klistel thanks for your contribution! |
* Add toggle for verbose logging Updated params with 'verbose' mode (defaults to False, which is existing behavior) to allow users to toggle verbose to True, which disables the '-q' flag that was hardcoded in the original module * Create 8379-verbose-mode-pkg5.yml * update pkg5.py to conform to PEP8 length requirements The new verbosity argument on line 172 broke the 160 character length PEP8 requirement - split the line in two to conform to PEP8 * Add PR link to changelog fragement yml Co-authored-by: Felix Fontein <felix@fontein.de> * Add version_added and make the description of the verbose param clearer * Update pkg5.py verbose description to conform to ansible documentation for semantic markup Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
* Add toggle for verbose logging Updated params with 'verbose' mode (defaults to False, which is existing behavior) to allow users to toggle verbose to True, which disables the '-q' flag that was hardcoded in the original module * Create 8379-verbose-mode-pkg5.yml * update pkg5.py to conform to PEP8 length requirements The new verbosity argument on line 172 broke the 160 character length PEP8 requirement - split the line in two to conform to PEP8 * Add PR link to changelog fragement yml Co-authored-by: Felix Fontein <felix@fontein.de> * Add version_added and make the description of the verbose param clearer * Update pkg5.py verbose description to conform to ansible documentation for semantic markup Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
Updated params for community.general.pkg5 with 'verbose' mode (defaults to False, which is existing silent execution behavior) to allow users to toggle verbose to True, which disables the '-q' flag that was hardcoded in the original module
SUMMARY
Fixes: #8379
Add a simple boolean to enable the user of the pkg5 module to enable verbose mode, which removes the previously hardcoded -q flag from the command string.
ISSUE TYPE
COMPONENT NAME
pkg5
ADDITIONAL INFORMATION
The existing module.run_command included the arguments -q hardcoded. I added a user-driven boolean that removes the '-q' if the user sets the flag to true