For people experiencing this, can you test out:
https://github.com/ansible/ansible-modules-extras/pull/2126 need to know if
that's sufficient or if there's more code needed to fix this.  Also need to
know if there's any regressions introduced by it.

-Toshio

On Mon, May 9, 2016 at 8:41 AM, Toshio Kuratomi <tkurat...@ansible.com>
wrote:

>
>
> On Thu, May 5, 2016 at 7:31 AM, Brian Coca <bc...@ansible.com> wrote:
>
>>
>>   - in all versions of Ansible, put in a preceding space " {{lookup... ",
>> this will skip type detection.
>>   - in the latest versions a `|to_json` and certain other filters at the
>> end will also bypass the automatic type casting.
>>
>> Note on to_json -- I think that this is a bit confusing as what you'd
> want to do is pass a dictionary or list to to_json.  But when combining (at
> least in a single variable)  with lookup , what you end up is passing a
> string to to_json.  That is problematic because you then end up escaping
> that to make it a single json string.
>
> We are also adding a new feature for modules in 2.2 a type='json' which
>> will accept both JSON strings and/or python data structures which will
>> automatically be transformed to JSON. This will effectively be the same as
>> 'the better modules' I mention above and will be 'transparent' to users,
>> eventually eliminating the problem and confusion.
>>
>> I called the new type jsonarg.  Making use of it will require modules
> which have a parameter which is supposed to be a json string to change the
> parameter's type from "str" to "jsonarg".  It is better than the current
> hodgepodge where each module attempts to deal with this entirely on its
> own, sometimes leaving out certain cornercases as we're seeing here.
>
> -Toshio
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to