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)"

2,114 views
Skip to first unread message

sumit...@datatemplate.in

unread,
Jan 19, 2018, 2:23:26 AM1/19/18
to Ansible Project
this is line:

 - set_fact: vwa_rl_policy="{{VWA_UT_RL_Policy.stdout|from_json}}" 

Matt Martz

unread,
Jan 19, 2018, 10:47:14 AM1/19/18
to ansible...@googlegroups.com
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}}'

On Fri, Jan 19, 2018 at 1:23 AM, <sumit...@datatemplate.in> wrote:
this is line:

 - set_fact: vwa_rl_policy="{{VWA_UT_RL_Policy.stdout|from_json}}" 

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/48e8ac9a-476f-4979-aa71-67c7b469023b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net
Reply all
Reply to author
Forward
0 new messages