that worked! it's getting late here apparently...

vminfo: "{{ vminfo }} + [ {'name': 'test', 'ip': '{{ ansible_date_time.date 
}}', 'uuid': 'uuid-of-some-sort'} ]"

instead of:

vminfo: "{{ vminfo + [ {'name': 'test', 'ip': '{{ ansible_date_time.date 
}}', 'uuid': 'uuid-of-some-sort'} ] }}"

thank you so much once again!


Den tirsdag den 11. juli 2017 kl. 22.28.11 UTC+2 skrev Kai Stian Olstad:
>
> On 11. juli 2017 22:15, Rasmus Sjørslev wrote: 
> > - name: Register VM information which will later be written to disk as 
> YAML 
> >    set_fact: 
> >      vminfo: "{{ vminfo + [ {'name': '{{ item.hostname }}', 'ip': '{{ 
> > free_ip.json.data | ipv4 }}', 'uuid': '{{ 
> > vm_creation.instance.hw_product_uuid }}'} ] }}" 
>
> <snip /> 
>
> > - name: Register the assigned IP address for later use 
> >    set_fact: 
> >      new_vms: "{{ new_vms }} + [ '{{ free_ip.json.data | ipv4 }}' ]" 
>
> Well, they have not the same structure. 
> Have you tried writing the first one in the same manner that the second 
> one is? 
>
> {{ vminfo }} + ............ 
>
> -- 
> Kai Stian Olstad 
>

-- 
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/38a9fe8b-627a-4bbb-bf54-28a1aa0a80e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to