How to resolve this error ""msg": "the field 'args' has an invalid value ([]), and could not be converted to an dict.The error was: Extra data: line 2 column 1 - line 2 column 317 (char 315 - 631)"

this is line:

  • set_fact: vwa_rl_policy=“{{VWA_UT_RL_Policy.stdout|from_json}}”

You may be suffering from a limitation of the key=value syntax and how templating is performed.

When used with data like JSON that will return spaces, and when surrounding the value with double quotes, it will allow the resultant value, to break out of the assignment to the specified variable. An Example

  • set_fact: vwa_rl_policy=“{“foo”: “bar”}”

Instead you can try to use single quotes, or use full YAML syntax like:

  • set_fact:
    vwa_rl_policy: ‘{{VWA_UT_RL_Policy.stdout|from_json}}’