Fix extra_vars format and empty value case #15232
Open
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
For modules inventory, inventory_soruce, group, host and job_template
fixed
variable, extra_vars and source_vars parameters
so that modules while expecting dictionary as an input
push values in yaml format into AAP
Also, fixed edge case when user supplies empty dictionary so that yaml value being pushed into AAP is '---'
related #14918 #14842
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
Suggested testing.
(01) Create required objects with no variables/extra_vars
(02) Run the following (or similar) tasks
(03) Make sure that variables/extra_vars show right values and formatting in both yaml and json
(04) Run the following:
(05) Make sure that variables/extra_vars show right values and formatting in both yaml (---) and json ({})