Here's the bugs i know of because of this..

https://github.com/ansible/ansible-modules-core/issues/3404
https://github.com/ansible/ansible-modules-extras/issues/1813

On Thursday, 5 May 2016 17:14:59 UTC+10, Rob White wrote:
>
> It's even worse...
>
> "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      
> \"Sid\": \"\",\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n      
>   \"Service\": \"ec2.amazonaws.com\"\n      },\n      \"Action\": 
> \"sts:AssumeRole\"\n    }\n  ]\n}"
>
>
> :(
>
> On Thursday, 5 May 2016 16:34:26 UTC+10, Adam Hamsik wrote:
>>
>> Hi,
>>
>> On May 5, 2016 8:14 AM, "Rob White" <robwh...@gmail.com> wrote:
>> >
>> > Hi all,
>> >
>> > This is mostly aimed at the core team...
>> >
>> > Can you explain why the file lookup plugin changes the contents of the 
>> file as far as quotes are concerned?  I.e. it changes all double quotes to 
>> single quotes.
>> >
>> > I am not sure if it used to perform this action but all i know is 
>> modules that rely on loading json through a lookup('file','my.json') in to 
>> a parameter have recently started to fail and digging about has led me here.
>> >
>> > Obviously the problem is that single quotes is not valid json.
>>
>> What happens if you pipe it to to_json filter.
>>
>> >
>> > Can we not have the file lookup plugin return exactly what was passed 
>> in?
>> >
>> > Example:
>> >
>> > Passed in:
>> >
>> > {
>> >
>> >   "Version": "2012-10-17",
>> >
>> >   "Statement": [
>> >
>> >     {
>> >
>> >       "Sid": "",
>> >
>> >       "Effect": "Allow",
>> >
>> >       "Principal": {
>> >
>> >         "Service": "ec2.amazonaws.com"
>> >
>> >       },
>> >
>> >       "Action": "sts:AssumeRole"
>> >
>> >     }
>> >
>> >   ]
>> >
>> > }
>> >
>> >
>> > Passed out:
>> >
>> > {'Version': '2012-10-17', 'Statement': [{'Action': 'sts:AssumeRole', 
>> 'Principal': {'Service': 'ec2.amazonaws.com'}, 'Effect': 'Allow', 'Sid': 
>> ''}]}
>> >
>> >
>> >
>> > -- 
>> > 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-deve...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>

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