But it is not working. Adding extra {} . Am I doing something wrong

On Fri, 21 Jun 2019, 09:55 Dick Visser, <[email protected]> wrote:

>
>
> On Thu, 20 Jun 2019 at 19:50, Punit Jain <[email protected]>
> wrote:
>
>> Hi,
>>
>> Seems I am missing something really simple.
>>
>> ldap_data: |
>>   {% set ldapdata = {} -%}
>>   {% if ldap_content is defined -%}
>>     {{ ldapdata | combine({'a':10}, recursive='True') }}
>>   {%- endif -%}
>>  {{ldapdata}}
>>
>> populates ldap_data with value:
>> "ldap_data": "{'a': 10}*{}\*n"
>>
>> Dont understand why this last {} appears in output ?
>>
>
>
> First you set ldapdata to {}, and at the end you say {{ldapdata}}. So that
> makes sense.
>
>
>
>
>> Thanks
>> Punit
>>
>> --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAFXWBQKEmjsQ3PNz-hG5QrqfNCKepooe0rA2tsc_ijT%3D8Taevw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAFXWBQKEmjsQ3PNz-hG5QrqfNCKepooe0rA2tsc_ijT%3D8Taevw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNjCOn9p%3DZ36Ru0z_snwRcAGtXFPuYgLmWuLMN%3DwjRbfw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAL8fbwNjCOn9p%3DZ36Ru0z_snwRcAGtXFPuYgLmWuLMN%3DwjRbfw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFXWBQ%2BKMqbfKrJd5zsvyHRioJG_LTLegYga95ATENW3_dtUDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to