Fix verbosity parameter choices for ad_hoc_command module #13379
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.
Signed-off-by: Oscar oscar.bell@bell.local
SUMMARY
Fix for #13377
The verbosity parameter can't be used because the choices list in the module_args definition refers to strings instead of the required integer values. This pull request updates the choices list to an integer list which makes it possible to change the verbosity parameter.
When trying to change the verbosity parameter with the original module Ansible complains with an error message
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
To reproduce the bug add the verbosity parameter to the ad_hoc_command module call.
This will result in an Ansible validation error like below.
After the change in the module code the ad_hoc_command is started on the AWX host and in the output and details of the job we can see the verbosity level being set to 2.