It worked.
- name: LXC - Debug
debug: msg={{ item.hostname }}
with_items: containers
containers: [
{
hostname : "test",
lxc_rootfs : "{{ lxc_dir }}/test/rootfs",
lxc_mount : "{{ lxc_dir }}/test/fstab",
lxc_utsname : "test",
lxc_arch : "{{ ansible_architecture }}",
lxc_network_ipv4 : "10.0.3.103/24 10.0.3.255",
lxc_network_ipv4_gateway : "10.0.3.1",
lxc_network_type : "{{ | default(veth) }}",
lxc_network_flags : "{{ | default(up) }}",
lxc_network_link : "{{ | default(link) }}",
},
]
Thanks a lot.
2014-11-20 23:54 GMT-05:00 Brian Coca <[email protected]>:
> never mind, it wasn't that, these are the problem:
>
> lxc_rootfs : '{{ lxc_dir }}/{{ hostname }}/rootfs',
> lxc_mount : '{{ lxc_dir }}/{{ hostname }}/fstab',
> lxc_utsname : '{{ hostname }}',
>
> the 'hostname' variable you are referencing there does not exist. If
> you are trying to reference the key in the same dictionary, that will
> not work.
>
>
> --
> Brian Coca
>
> --
> 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/CAJ5XC8kpTxE0qv1OYAmcyJ%2BA%2BGH_q1UOAzdx0-qW43dSMT9JHQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Luis M. Ibarra
--
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/CAFyQ8TTp8RZp%3DfxBEsZ_hfWOjmrhRw1c09AUFCWyk_Yu0n3H6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.