You are passing it a string above.

Don't do that.

Try this:

- set_fact:
      x: <valid YAML datastructure goes here>




On Thu, Jul 17, 2014 at 1:16 PM, E.C. Raymond <[email protected]> wrote:

> What is the status on complex data storage for set_fact?  It seems like
> its not quite possible yet when I have tried multiple methods.
>
> - name: testing
>   set_fact: vms="['{ {{ item.item }}: {{ item.stdout.strip('\n') }} }']"
>   with_items:
>     - "{{ hostips }}"
>
>
> I found these links that got me close enough, but I am guessing that this
> is not yet supported.
>
> https://groups.google.com/forum/#!topic/ansible-project/cPbCD6R9TnE
>
> http://stackoverflow.com/questions/23507589/is-it-possible-to-set-a-fact-of-an-array-in-ansible
>
> Thanks.
>
> --
> 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/4a9f3744-44b1-44b4-82e5-d3cc65fd5ed0%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4a9f3744-44b1-44b4-82e5-d3cc65fd5ed0%40googlegroups.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/CA%2BnsWgzNwbqs8nDyOui7Jq%2Bj%3D5Eo-gQUaKBuap8epsEOxHJ76A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to